Registry / web-framework / go-macaron-csrf

go-macaron-csrf

JSON →
library0.0.0-20200329073418-5d38f39de352gogounverified

Package csrf is a middleware that generates and validates CSRF tokens for the Macaron web framework.

go get github.com/go-macaron/csrf
INSTALL
IMPORT
SIG · GO-MACARON-CSRF
G
go-macaron-csrf
web-frameworkgov0.0.0-20200329073418-5d38f39de352
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

csrf
github.com/go-macaron/csrf

Sets up CSRF protection in a Macaron web application.

package main import ( "gopkg.in/macaron.v1" "github.com/go-macaron/csrf" ) func main() { m := macaron.Classic() m.Use(csrf.Csrfer()) m.Get("/", func(ctx *macaron.Context, csrf csrf.CSRF) { ctx.Write([]byte(csrf.GetToken())) }) m.Run() }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20200329073418-5d38f39de352latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
go-macaron-csrf — go get go-macaron-csrf · libregistry