HTTP Middleware & Headers
Strongly-typed HTTP header parsing and construction, CORS middleware with preflight, ETag generation + conditional-request helpers, cookie parsing/serialisation, typed HTTP error classes with factory methods, composable client middleware. The layer between the framework and the wire — works regardless of whether the framework on top is Rails, Express, ASP.NET, or bare Go.
Projects
Packages (29)
- @philiprehberger/dotnet-api-error-standardizerdotnet
Middleware for consistent, structured JSON API error responses.
- @philiprehberger/dotnet-background-task-queuedotnet
Simple in-memory background job queue for ASP.NET Core with concurrency control.
- @philiprehberger/dotnet-event-busdotnet
In-process publish/subscribe event bus with middleware pipeline, dead-letter queue, event replay, and Microsoft DI integration.
- @philiprehberger/dotnet-health-check-kitdotnet
Composable health checks for ASP.NET Core with built-in URL, TCP, DNS, certificate, disk, and memory checks.
- @philiprehberger/dotnet-http-debug-handlerdotnet
DelegatingHandler that logs and times every outgoing HttpClient request.
- @philiprehberger/dotnet-pipelinedotnet
Middleware pipeline builder for any operation — like ASP.NET Core middleware but for business logic.
- @philiprehberger/go-httputilgo
Composable HTTP client middleware for Go. Build instrumented `http.Client` instances with zero hassle
- @philiprehberger/go-middlewarego
Composable HTTP middleware collection for Go's `net/http`. No framework required
- @philiprehberger/go-ratelimitgo
Token bucket rate limiter for Go with per-key limiting and HTTP middleware. Zero external dependencies
- @philiprehberger/go-respondgo
HTTP JSON response helpers for Go. Write JSON responses in one line instead of five
- @philiprehberger/go-slog-redactgo
Sensitive field redaction middleware for Go's `log/slog`
- @philiprehberger/go-webhook-signaturego
HMAC-SHA256 webhook signature generation and verification with HTTP middleware for Go
- @philiprehberger/laravel-api-versioningphp
Laravel middleware for API versioning with multi-source resolution from headers, Accept vendor types, and URL path segments
- @philiprehberger/laravel-correlation-idphp
Laravel middleware that generates or propagates correlation IDs for request tracing with automatic log context injection
- @philiprehberger/laravel-security-headersphp
Laravel middleware for comprehensive security headers including CSP with nonce support, HSTS, and Permissions-Policy
- @philiprehberger/py-api-timerpython
Drop-in ASGI/WSGI middleware for endpoint timing with Server-Timing headers.
- @philiprehberger/rb-corsruby
CORS middleware with origin validation and preflight handling
- @philiprehberger/rb-etagruby
ETag generation and conditional request helpers with Rack middleware
- @philiprehberger/rb-header-kitruby
HTTP header parsing, construction, and content negotiation
- @philiprehberger/rb-middlewareruby
Generic middleware stack for composing processing pipelines with conditional execution, hooks, error handling, profiling, and stack composition
- @philiprehberger/rb-uri-kitruby
URL manipulation with query parameter management and normalization
- @philiprehberger/rs-typed-headersrust
Strongly-typed HTTP header parsing and construction for common headers
- @philiprehberger/cookie-tstypescript
Parse, serialize, and manage HTTP cookies with full typing
- @philiprehberger/middleware-tstypescript
Framework-agnostic middleware composition engine
- @philiprehberger/next-api-middlewaretypescript
Next.js API route middleware: compose, validation, CSRF protection, and security headers
- @philiprehberger/next-layout-componentstypescript
Layout primitives for Next.js and React apps - Page wrapper and Card component
- @philiprehberger/query-string-tstypescript
Type-safe URL query string parsing and building
- @philiprehberger/ts-http-errortypescript
Typed HTTP error classes with status codes, factory methods, and serialization
- @philiprehberger/web-vitalstypescript
Web Vitals calculation utilities and client error capture