middleware

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors added in v1.5.1

func Cors(inner http.Handler) http.Handler

Cors is a middleware to enabling CORS on HTTP requests

func HSTS added in v1.7.0

func HSTS(inner http.Handler) http.Handler

HSTS is a middleware to enabling HSTS on HTTP requests

func Logger

func Logger(next http.Handler) http.Handler

Logger is a middleware to log HTTP request

func XFF added in v1.16.0

func XFF(inner http.Handler) http.Handler

XFF is a middleware to identifying the originating IP address using X-Forwarded-For header

Types

type Middleware added in v1.9.0

type Middleware func(inner http.Handler) http.Handler

Middleware function definition

func AuthN added in v1.9.0

func AuthN(authenticator auth.Authenticator) Middleware

AuthN is a middleware to checks HTTP request credentials

func Methods added in v1.9.0

func Methods(methods ...string) Middleware

Methods is a middleware to check that the request use the correct HTTP method

func Signature added in v1.16.0

func Signature(ts truststore.TrustStore) Middleware

Signature is a middleware to checks HTTP request signature

func Tracing

func Tracing(nextRequestID func() string) Middleware

Tracing is a middleware to trace HTTP request

type Middlewares added in v1.13.0

type Middlewares []Middleware

Middlewares list

func (Middlewares) UseAfter added in v1.13.0

func (ms Middlewares) UseAfter(m Middleware) Middlewares

UseAfter add a middleware at the end of the middleware chain

func (Middlewares) UseBefore added in v1.13.0

func (ms Middlewares) UseBefore(m Middleware) Middlewares

UseBefore insert a middleware at the begining of the middleware chain

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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