Go API
github.com/gofiber/fiber/v3
github.com/gofiber/fiber/v3
Package fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go.
addon/retry
binder
client
Package client exposes Fiber's HTTP client built on top of fasthttp.
extractors
internal/appconfig
Package appconfig hands request hot paths the few Config bits they read on every call, without the copy App.Config returns by value.
internal/apptest
Package apptest provides the request/response plumbing that nearly every Fiber test repeats: sending a request through an app, checking the transport error, the status and the body, borrowing a request context from an app, and waiting on a channel with a deadline.
internal/bodystream
Package bodystream buffers a streamed request body within a size limit.
internal/bytepolicy
Package bytepolicy defines which bytes the control-character checks of BasicAuth, request IDs and quoted strings reject.
internal/byterange
Package byterange adds the Range and If-Range rules (RFC 9110 §13.1.5, §14.2) that fasthttp's file server lacks: it takes only a lower-case "bytes" unit, applies Range to HEAD and matches If-Range by date alone.
internal/clocktest
Package clocktest lets tests wait on the cached, second-granularity clock that fiber's memory storages and rate-limit windows are measured against, and provides a manually advanced clock for code that takes its time source.
internal/contextvalue
internal/cookie
Package cookie centralizes cookie policy shared by Fiber core and middleware.
internal/crosshost
Package crosshost names the request headers that must not survive a redirect to a host other than the one they were sent to.
internal/ctxlocal
Package ctxlocal stores request locals without the allocation a variadic Locals call through the Ctx interface costs.
internal/errorreplay
Package errorreplay marks the middleware run Fiber replays for a request the server refused while reading it, so middleware that stores responses can stay out.
internal/escapedpath
Package escapedpath resolves URL references through net/url on the path as written, so an escape such as "%2F" is never decoded into a separator.
internal/etag
Package etag parses and compares HTTP entity tags (RFC 9110 Section 8.8.3).
internal/fieldname
Package fieldname reads and removes HTTP header fields by name case-insensitively (RFC 9110 §5.1).
internal/fspath
Package fspath holds the checks that stand between a request and the fasthttp file handler, for the static middleware and SendFile.
internal/headerlist
Package headerlist walks the comma-separated list values that RFC 9110 Section 5.6.1 defines, and joins the field lines that Section 5.3 says are equivalent to one.
internal/headerlookup
Package headerlookup answers, for a caller holding a fiber.Ctx, the two questions the byte-exact header API cannot: whether the stored field names are canonical, and what a named request header holds if they are not.
internal/hostname
Package hostname splits host:port values and converts IDN host names.
internal/ipv6host
Package ipv6host writes IPv6 hosts in the one form browsers serialize them in, so that every spelling of an address (RFC 4291 Section 2.2) compares equal.
internal/loggertest
Package loggertest provides shared helpers for the middleware ctx-logger integration tests.
internal/logtemplate
internal/mediatype
Package mediatype parses media types and their parameters (RFC 9110 Section 8.3.1), and canonicalizes the case-insensitive parts of a request's Content-Type, so the case-sensitive parsers downstream — fasthttp's form and multipart readers above all — see the value they expect.
internal/memory
Package memory provides a high-performance in-memory storage that can store any type without encoding overhead.
internal/nilerror
internal/origin
Package origin validates and matches the serialized origins that the CORS and CSRF middleware compare against their configured allow lists.
internal/paramdelim
Package paramdelim holds the byte set that ends a ":name" placeholder in a path.
internal/personalheader
Package personalheader names the response headers that belong to the one client a response is for.
internal/quotedstring
Package quotedstring encodes values placed inside HTTP quoted strings.
internal/redact
Package redact provides common helpers for masking sensitive values in log output.
internal/redirectbody
Package redirectbody turns a request into one without a body, for the hop a redirect sends it on as a GET: the client and the proxy follow redirects each with a loop of their own, and what goes with the body is decided here for both.
internal/requesthold
Package requesthold keeps the fasthttp.RequestCtx of a request out of reuse for as long as the net/http handler adapted for it runs.
internal/rulematch
Package rulematch provides pattern compilation and capture substitution shared by redirect and rewrite rules.
internal/schemehost
Package schemehost compares the scheme and host of two URLs for same-origin checks.
internal/sizedstream
Package sizedstream buffers a body stream within a length: the one a response declares, or a request's limit.
internal/storage/memory
Package memory Is a copy of the storage memory from the external storage packet as a purpose to test the behavior in the unittests when using a storages from these packets
internal/storagetest
Package storagetest provides the fiber.Storage fakes that the tests of the root package and of the storage-backed middleware keep needing: a map-backed storage with a per-operation error table and a log of the calls it served, and a storage that always fails.
internal/testconventions
Package testconventions holds the test that enforces the conventions of the repository's own tests: the shared helpers in internal/apptest, internal/storagetest and internal/clocktest, parallel tests and the compact layout described in AGENTS.md.
internal/tlshandshake
Package tlshandshake bounds the TLS handshake of a fasthttp host client by the time its request has.
internal/tlstest
internal/unsent
Package unsent marks a request whose connection was closed without a response, so middleware that stores or counts responses can tell.
internal/urlnorm
Package urlnorm applies the parts of the WHATWG URL parser's input handling a guard must apply before judging a URL Fiber is about to emit.
internal/wiretarget
Package wiretarget spells the path the router matched the way a request line carries it, for middleware that hands the request on to something that reads request lines: a proxy upstream, a net/http or fasthttp handler.
log
middleware/adaptor
middleware/basicauth
middleware/cache
Special thanks to @codemicro for moving this to fiber core Original middleware: github.com/codemicro/fiber-cache
middleware/compress
middleware/cors
middleware/csrf
middleware/deprecation
middleware/earlydata
middleware/encryptcookie
middleware/envvar
middleware/etag
middleware/expvar
middleware/favicon
middleware/healthcheck
middleware/helmet
middleware/hostauthorization
middleware/idempotency
middleware/keyauth
middleware/limiter
middleware/logger
middleware/paginate
middleware/pprof
middleware/proxy
middleware/recover
middleware/redirect
middleware/requestid
middleware/responsetime
middleware/rewrite
middleware/session
Package session provides session management middleware for Fiber.
middleware/skip
middleware/sse
Package sse provides a small Server-Sent Events handler for Fiber.