Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!
Basic Authentication middleware for Fiber that provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized or a custom response for missing or invalid credentials.
Cache middleware for Fiber designed to intercept responses and cache them. This middleware will cache the Body, Content-Type and StatusCode using the c.Path() as unique identifier. Special thanks to @codemicro for creating this middleware for Fiber core!
Compression middleware for Fiber that will compress the response using gzip, deflate and brotli compression depending on the Accept-Encoding header.
CORS middleware for Fiber that can be used to enable Cross-Origin Resource Sharing with various options.
The CSRF middleware for Fiber provides protection against Cross-Site Request Forgery (CSRF) attacks. Requests made using methods other than those defined as 'safe' by RFC9110#section-9.2.1 (GET, HEAD, OPTIONS, and TRACE) are validated using tokens. If a potential attack is detected, the middleware will return a default 403 Forbidden error.
The Early Data middleware for Fiber adds support for TLS 1.3's early data ("0-RTT") feature.
📄️ Encrypt Cookie
Encrypt Cookie is a middleware for Fiber that secures your cookie values through encryption.
EnvVar middleware for Fiber that can be used to expose environment variables with various options.
ETag middleware for Fiber that lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content has not changed.
Expvar middleware for Fiber that serves via its HTTP server runtime exposed variants in the JSON format. The package is typically only imported for the side effect of registering its HTTP handlers. The handled path is /debug/vars.
Favicon middleware for Fiber that ignores favicon requests or caches a provided icon in memory to improve performance by skipping disk access. User agents request favicon.ico frequently and indiscriminately, so you may wish to exclude these requests from your logs by using this middleware before your logger middleware.
Filesystem middleware for Fiber that enables you to serve files from a directory.
📄️ Health Check
Liveness and readiness probes middleware for Fiber that provides two endpoints for checking the liveness and readiness state of HTTP applications.
Helmet middleware helps secure your apps by setting various HTTP headers.
Idempotency middleware for Fiber allows for fault-tolerant APIs where duplicate requests — for example due to networking issues on the client-side — do not erroneously cause the same action performed multiple times on the server-side.
Key auth middleware provides a key based authentication.
Limiter middleware for Fiber that is used to limit repeat requests to public APIs and/or endpoints such as password reset. It is also useful for API clients, web crawling, or other tasks that need to be throttled.
Logger middleware for Fiber that logs HTTP request/response details.
Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor
Pprof middleware for Fiber that serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool. The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/.
Proxy middleware for Fiber that allows you to proxy requests to multiple servers.
Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.
Redirection middleware for Fiber.
RequestID middleware for Fiber that adds an identifier to the response.
Rewrite middleware rewrites the URL path based on provided rules. It can be helpful for backward compatibility or just creating cleaner and more descriptive links.
Session middleware for Fiber.
Skip middleware for Fiber that skips a wrapped handler if a predicate is true.
There exist two distinct implementations of timeout middleware Fiber.