2018-project-roaster: github.com/LuleaUniversityOfTechnology/2018-project-roaster/middleware Index | Files

package middleware

import "github.com/LuleaUniversityOfTechnology/2018-project-roaster/middleware"

Package middleware implements http.Handler middleware.

Package middleware CORS implementation.

Package middleware implements http.Handler middleware.

Package middleware implements http.Handler middleware.

Index

Package Files

contenttype.go cors.go csrf.go redirect.go

func AcceptContentType Uses

func AcceptContentType(t string) mux.MiddlewareFunc

AcceptContentType wraps the Gorilla handlers.ContentTypeHandler as a middleware.

func CORS Uses

func CORS() mux.MiddlewareFunc

CORS wraps the gorilla/handlers CORS middleware.

func CSRF Uses

func CSRF(key []byte, opts ...csrf.Option) mux.MiddlewareFunc

CSRF wraps the gorilla/csrf Protect middleware with an initiated key and injects the X-Csrf-Token.

func EnforceContentType Uses

func EnforceContentType(t string) mux.MiddlewareFunc

EnforceContentType enforces Content-Type for both the request and response.

func Redirect Uses

func Redirect(h http.Handler) http.Handler

Redirect redirects all HTTP requests to HTTPS.

Package middleware imports 6 packages (graph) and is imported by 4 packages. Updated 2019-01-14. Refresh now. Tools for package owners.