middleware

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress

func Compress(next http.Handler) http.Handler

GZIP/Deflate compression supports.

func Header(values http.Header) func(http.Handler) http.Handler

Header adds the given response headers to the upcoming `http.ResponseWriter`.

func Logger

func Logger(next http.Handler) http.Handler

Logger renders the simple HTTP accesses logs for the upcoming http.Handler.

func NoCache

func NoCache(next http.Handler) http.Handler

NoCache writes the proper response headers to inform the client side not to cache the response's content.

func Static

func Static(dir string) func(http.Handler) http.Handler

Static serves as file server for static assets, as convention, the given dir name will be used as the URL prefix.

func XSRF

func XSRF(next http.Handler) http.Handler

XSRF serves as Cross-Site Request Forgery protection middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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