middlewares

package
v0.0.0-...-925651e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateMiddleware

func AuthenticateMiddleware(ctx lucid.Context) lucid.Middleware

func CsrfProtectMiddleware

func CsrfProtectMiddleware(next http.Handler) http.Handler

CsrfProtectMiddleware here, we initialize gorilla's csrf by default we set the csrf_auth_key too

func CsrfSetterMiddleware

func CsrfSetterMiddleware(next http.Handler) http.Handler

CsrfSetterMiddleware here, we pass the token as X-CSRF-Token via header

func CsrfShouldSkipMiddleware

func CsrfShouldSkipMiddleware(next http.Handler) http.Handler

CsrfShouldSkipMiddleware here, we determine if we should skip the csrf mainly we skip if the condition inside IsJsonRequest(...) returns true, basically if the request wanted a json response

func HttpAccessLogMiddleware

func HttpAccessLogMiddleware(ctx lucid.Context, next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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