🧬 Middleware

Middleware is a function chained in the HTTP request cycle with access to the Context which it uses to perform a specific action, for example, logging every request or enabling CORS.

Official Middleware

Middleware

Description

adaptor

Converter for net/http handlers to/from Fiber request handlers, special thanks to @arsmn!

basicauth

Basic auth middleware provides an HTTP basic authentication. It calls the next handler for valid credentials and 401 Unauthorized for missing or invalid credentials.

compression

cors

csrf

embed

FileServer middleware for Fiber, special thanks and credits to Alireza Salary

helmet

jwt

JWT returns a JSON Web Token (JWT) auth middleware.

keyauth

limiter

logger

pprof

Special thanks to Matthew Lee (@mthli)

recover

requestid

Adds an indentifier to the response using the X-Request-ID header

rewrite

session

This session middleware is build on top of fasthttp/session by @savsgio MIT. Special thanks to @thomasvvugt for helping with this middleware.

template

This package contains 8 template engines that can be used with Fiber v1.10.0 Go version 1.13 or higher is required.

websocket

Based on Fasthttp WebSocket for Fiber with Locals support!

Third-Party Middleware

Middleware

Description

fiber-swagger

fiber-casbin

fiber-introspect

fiber_tracing

fiber_limiter

fiber-boilerplate

gqlgen

Guidelines

Unfinished documentation