You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some handlers that use POST, PUT etc that I do NOT want to be protected by nosurf. These are REST API endpoints that don't need CSRF protection as you can't use them without an Auth-Token header anyway.
It might not be an ideal solution, but I would not like to introduce much complexity for filtering routes in nosurf itself (separate blacklist/whitelist modes, etc.).
I have some handlers that use POST, PUT etc that I do NOT want to be protected by nosurf. These are REST API endpoints that don't need CSRF protection as you can't use them without an Auth-Token header anyway.
I can use nosurf like this:
But now my poor REST API endpoints get a Vary Cookie and a Set-Cookie too.
Can I use nosurf to protect just individual handler functions and now the whole mux thing?
The text was updated successfully, but these errors were encountered: