middleware

package
v0.0.0-...-91b10cc Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(next http.Handler) http.Handler

CORS is a middleware that sets the Access-Control-Allow-Origin and Access-Control-Allow-Headers headers to "*" for all requests. This allows all origins to access the API.

func Compression

func Compression(next http.Handler) http.Handler

func Recover

func Recover(next http.Handler) http.Handler

Recoverer is a middleware that recovers from panics, logs the error and returns a HTTP 500 (Internal Server Error) status.

Types

This section is empty.

Jump to

Keyboard shortcuts

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