Help us shape the future of Go! Take the 2026 Go Developer Survey

middleware/

directory
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT

Directories

Path Synopsis
Package bodylimit caps request body reads for a router or group.
Package bodylimit caps request body reads for a router or group.
Package contenttype provides opt-in middleware that rejects requests whose body media type is not allowed.
Package contenttype provides opt-in middleware that rejects requests whose body media type is not allowed.
Package cors grants browser access to cross-origin responses.
Package cors grants browser access to cross-origin responses.
Package csrf provides Cross-Site Request Forgery protection middleware.
Package csrf provides Cross-Site Request Forgery protection middleware.
Package errormap provides middleware that translates errors returned by handlers into HTTP problems.
Package errormap provides middleware that translates errors returned by handlers into HTTP problems.
Package locale provides middleware that picks the response language from the request and hands it to validate to translate validation messages.
Package locale provides middleware that picks the response language from the request and hands it to validate to translate validation messages.
internal/negotiation
Package negotiation resolves original catalog keys from HTTP preferences.
Package negotiation resolves original catalog keys from HTTP preferences.
Package ratelimit provides middleware that limits requests per key with a sliding window counted in a cache, answering 429 by default with RateLimit headers.
Package ratelimit provides middleware that limits requests per key with a sliding window counted in a cache, answering 429 by default with RateLimit headers.
internal/window
Package window computes exact sliding-counter usage and recovery intervals.
Package window computes exact sliding-counter usage and recovery intervals.
Package requestlog logs returned handler errors and observed 5xx responses to a slog.Logger.
Package requestlog logs returned handler errors and observed 5xx responses to a slog.Logger.
Package secureheaders provides HTTP security response-header middleware.
Package secureheaders provides HTTP security response-header middleware.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL