Versions in this module Expand all Collapse all v1 v1.8.0 Jun 3, 2021 Changes in this version + func UnsafeSkipCheck(r *http.Request) *http.Request + type Option func(*csrf) + func SameSite(s SameSiteMode) Option + func TrustedOrigins(origins []string) Option + func TrustedTokens(tokens []string) Option + type SameSiteMode int + const SameSiteDefaultMode + const SameSiteLaxMode + const SameSiteNoneMode + const SameSiteStrictMode v1.0.2 Aug 26, 2015 Changes in this version + func CookieName(name string) func(*csrf) v1.0.1 Aug 5, 2015 Changes in this version + var ErrBadReferer = errors.New("referer invalid") + var ErrBadToken = errors.New("CSRF token invalid") + var ErrNoReferer = errors.New("referer not supplied") + var ErrNoToken = errors.New("CSRF token not found in request") + var TemplateTag = "csrfField" + func Domain(domain string) func(*csrf) + func ErrorHandler(h http.Handler) func(*csrf) + func FailureReason(r *http.Request) error + func FieldName(name string) func(*csrf) + func HttpOnly(h bool) func(*csrf) + func MaxAge(age int) func(*csrf) + func Path(p string) func(*csrf) + func Protect(authKey []byte, opts ...func(*csrf)) func(http.Handler) http.Handler + func RequestHeader(header string) func(*csrf) + func Secure(s bool) func(*csrf) + func TemplateField(r *http.Request) template.HTML + func Token(r *http.Request) string Other modules containing this package github.com/tscheckenbach/csrf/v2