Registry / web-framework / gorilla-csrf

gorilla-csrf

JSON →
library1.7.3gogounverified

Cross Site Request Forgery (CSRF) prevention middleware for Go web applications.

go get github.com/gorilla/csrf
INSTALL
IMPORT
SIG · GORILLA-CSRF
G
gorilla-csrf
web-frameworkgov1.7.3
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/gorilla/csrf

Protects a web handler with CSRF middleware.

package main import ( "net/http" "github.com/gorilla/csrf" ) func main() { r := http.NewServeMux() r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) }) http.ListenAndServe(":8080", csrf.Protect([]byte("32-byte-long-auth-key"))(r)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.7.3latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
gorilla-csrf — go get gorilla-csrf · libregistry