Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSRF Protections Blocking Browser-sent GET Requests #208

Closed
oalexander6 opened this issue Jul 20, 2024 · 1 comment
Closed

XSRF Protections Blocking Browser-sent GET Requests #208

oalexander6 opened this issue Jul 20, 2024 · 1 comment

Comments

@oalexander6
Copy link
Contributor

I discovered while using this library that the current XSRF protections do not allow for a GET request sent by the browser on protected routes, due to requiring the presence of the XSRF token in a header. This is a problem for applications that are not SPAs and send GET requests to the server to retrieve a new HTML page. In these situations, the common pattern is to skip XSRF checks on GET requests.

For example, links in my application trigger GET requests when clicked, and without writing a custom onclick handler for links (which I would rather not do, as I am using raw HTML templates), there is no place to write the logic to grab the XSRF cookie and add it to the request as a header.

I have opened a PR to address this issue.

@paskal
Copy link
Collaborator

paskal commented Jul 30, 2024

Resolved by #207 and #210, thanks for your contribution!

@paskal paskal closed this as completed Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants