ποΈ Adaptor
The adaptor package provides utilities for converting between Fiber and net/http. It allows seamless integration of net/http handlers, middleware, and requests into Fiber applications, and vice versa.
ποΈ BasicAuth
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
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!
ποΈ Compress
Compression middleware for Fiber that will compress the response using gzip, deflate, brotli, and zstd compression depending on the Accept-Encoding header.
ποΈ CORS
CORS (Cross-Origin Resource Sharing) is a middleware for Fiber that allows servers to specify who can access its resources and how. It's not a security feature, but a way to relax the security model of web browsers for cross-origin requests. You can learn more about CORS on Mozilla Developer Network.
ποΈ CSRF
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.
ποΈ EarlyData
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
EnvVar middleware for Fiber that can be used to expose environment variables with various options.
ποΈ ETag
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
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
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.
ποΈ Health Check
Liveness, readiness and startup probes middleware for Fiber that provides three endpoints for checking the liveness, readiness, and startup state of HTTP applications.
ποΈ Helmet
Helmet middleware helps secure your apps by setting various HTTP headers.
ποΈ Idempotency
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 to be performed multiple times on the server-side.
ποΈ Keyauth
Key auth middleware provides a key based authentication.
ποΈ Limiter
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
Logger middleware for Fiber that logs HTTP request/response details.
ποΈ Monitor
Monitor middleware for Fiber that reports server metrics, inspired by express-status-monitor
ποΈ Pprof
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
Proxy middleware for Fiber that allows you to proxy requests to multiple servers.
ποΈ Recover
Recover middleware for Fiber that recovers from panics anywhere in the stack chain and handles the control to the centralized ErrorHandler.
ποΈ Redirect
Redirection middleware for Fiber.
ποΈ RequestID
RequestID middleware for Fiber that adds an identifier to the response.
ποΈ Rewrite
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
The session middleware provides session management for Fiber applications, utilizing the Storage package for multi-database support via a unified interface. By default, session data is stored in memory, but custom storage options are easily configurable (see examples below).
ποΈ Skip
Skip middleware for Fiber that skips a wrapped handler if a predicate is true.
ποΈ Static
Static middleware for Fiber that serves static files such as images, CSS, and JavaScript.
ποΈ Timeout
There exist two distinct implementations of timeout middleware Fiber.