middlewares

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger(next http.Handler) http.Handler

AccessLogger logs the details of the incoming requests and outgoing responses.

func Auth

func Auth(next http.Handler) http.Handler

Auth middleware verifies if the x-password header in the request matches the one in configs.

func CORS

func CORS(next http.Handler) http.Handler

CORS middleware handles CORS issues.

func Recovery

func Recovery(next http.Handler) http.Handler

Recovery recovers any panics that happen during request execution and returns a sanitized response.

func RequestContext

func RequestContext(next http.Handler) http.Handler

RequestContext attaches information to the request's context, such as: request ID, entry-time etc.

Types

This section is empty.

Jump to

Keyboard shortcuts

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