middleware

package
v0.0.0-...-8707f5c Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableCORS

func EnableCORS(next http.Handler) http.Handler

Set the HTTP Access-Control-Allow-Origin header to '*'

func Logger

func Logger(next http.Handler) http.Handler

Simple API HTTP logger middleware

func SetResponseTypeToJSON

func SetResponseTypeToJSON(next http.Handler) http.Handler

Set the HTTP Content-Type header to application/json for the API routes

Types

This section is empty.

Jump to

Keyboard shortcuts

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