Registry / web-framework / justinas-nosurf

justinas-nosurf

JSON →
library1.2.0gogounverified

An HTTP handler that mitigates Cross-Site Request Forgery (CSRF) attacks.

go get github.com/justinas/nosurf
INSTALL
IMPORT
SIG · JUSTINAS-NOSURF
J
justinas-nosurf
web-frameworkgov1.2.0
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.

nosurf
github.com/justinas/nosurf

Wraps an HTTP handler with CSRF protection.

package main import ( "net/http" "github.com/justinas/nosurf" ) func main() { handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello")) }) http.ListenAndServe(":8080", nosurf.New(handler)) }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
justinas-nosurf — go get justinas-nosurf · libregistry