gorilla / csrf

Package gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications & services 🔒

Home Page:https://gorilla.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[docs]

u0nel opened this issue · comments

commented

csrf/doc.go

Lines 17 to 22 in b69cbb3

gorilla/csrf is easy to use: add the middleware to individual handlers with
the below:
CSRF := csrf.Protect([]byte("32-byte-long-auth-key"))
http.HandlerFunc("/route", CSRF(YourHandler))

This doesn't seem to be right. Shouldn't it be http.Handle ?

commented

This issue has been automatically marked as stale because it hasn't seen a recent update. It'll be automatically closed in a few days.