gorilla/csrf

[question] Downsides of `csrf.Path("/")`?

adiabatic opened this issue · 2 comments

After looking at all the issues with "Path" in them, I've added csrf.Path("/") to the list of options I'm passing to csrf.Protect(). Now, when I POST to /dashboard/bags/new/ from /dashboard/ I don't get a CSRF-token-invalid error.

That said, the documentation for Path says that the default is the path the cookie was issued from. What, if anything, am I risking by having just the one CSRF cookie for /?

Good to know. Thanks!