Registry / web-framework / macaron-csrf

macaron-csrf

JSON →
library0.0.0-20201112042935-9889eb38af52gogounverified

A CSRF middleware for the Macaron web framework that generates and validates tokens.

go get gitea.com/macaron/csrf
INSTALL
IMPORT
SIG · MACARON-CSRF
M
macaron-csrf
web-frameworkgov0.0.0-20201112042935-9889eb38af52
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
gitea.com/macaron/csrf

Adds CSRF protection to a Macaron route

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

No known issues recorded.

Upgrade
Version history
0.0.0-20201112042935-9889eb38af52latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
macaron-csrf — go get macaron-csrf · libregistry