middlewarex

package
v0.0.0-...-0941746 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestIDCtxKey = requestIDContextKey{}

RequestIDCtxKey is the key that holds the unique request ID in a request context.

Functions

func Http3AltSvc

func Http3AltSvc(port *string) func(next http.Handler) http.Handler

func MaxBodySize

func MaxBodySize(maxSize int64) func(next http.Handler) http.Handler

func NoCache

func NoCache(next http.Handler) http.Handler

func Recoverer

func Recoverer(next http.Handler) http.Handler

func RequestID

func RequestID(header string) func(next http.Handler) http.Handler

func SetLogger

func SetLogger(logger *slog.Logger) func(next http.Handler) http.Handler

SetLogger injects `logger` in the context of requests

func SetServerHeader

func SetServerHeader(server string) func(next http.Handler) http.Handler

func StrictTransportSecurity

func StrictTransportSecurity(maxAge *string, includeSubDomains bool) func(next http.Handler) http.Handler

StrictTransportSecurity sets the Strict-Transport-Security header to maxAge if maxAge is empty, it's set to 63072000

Types

This section is empty.

Jump to

Keyboard shortcuts

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