//
pkg.gl
Category
github.com/elisasre/go-common/v2
middleware
csrf
package
2.1.1
Repository:
https://github.com/elisasre/go-common.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
9
Dependents
0
Files
151 SLOC
#
Functions
New
New creates new CSRF middleware for gin.
RandomToken
RandomToken returns random sha256 string.
#
Constants
Authorization
Authorization is the header name which contains the token.
TokenCookieKey
TokenCookieKey is the cookie name which contains the CSRF token.
TokenHeaderKey
nolint: gosec.