middleware

package
v0.0.0-...-d78814b Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2019 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AgeGate

func AgeGate(verifyHandler func(http.ResponseWriter, *http.Request)) negroni.HandlerFunc

AgeGate is a middleware generator that does age verification for NSFW sites.

func CSRF

func CSRF(onError func(http.ResponseWriter, *http.Request, string)) negroni.HandlerFunc

CSRF is a middleware generator that enforces CSRF tokens on all POST requests.

func ExampleCSRF

func ExampleCSRF()

ExampleCSRF shows how to use the CSRF handler.

func GenerateCSRFToken

func GenerateCSRFToken(w http.ResponseWriter, r *http.Request, session *gorilla.Session) string

GenerateCSRFToken generates a CSRF token for the user and puts it in their session.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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