middleware

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth added in v0.5.0

func Auth(users map[string]string) func(next http.Handler) http.Handler

Auth sets basic HTTP authorization

func CORS

func CORS() func(next http.Handler) http.Handler

CORS sets permissive cross-origin resource sharing rules.

func Logger

func Logger(log *log.Logger) func(next http.Handler) http.Handler

Logger is a middleware that logs each request, along with some useful data about what was requested, and what the response was.

func Recover

func Recover() func(next http.Handler) http.Handler

Recover is a middleware that recovers from panics that occur for a request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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