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

switch PNI product voting CSRF over to just-in-time fetching #7880

Closed
Pomax opened this issue Nov 17, 2021 · 0 comments · Fixed by #7885
Closed

switch PNI product voting CSRF over to just-in-time fetching #7880

Pomax opened this issue Nov 17, 2021 · 0 comments · Fixed by #7885
Assignees

Comments

@Pomax
Copy link
Contributor

Pomax commented Nov 17, 2021

  • load product page without CSRF token so that it's the same content for all users
  • make the voting JS fetch the token from a dedicated CSRF endpoint on the server.
  • then add that into the vote POST instead of querying the DOM for it.

this will allow us to cache-excempt the CSRF endpoint, without PNI product pages breaking the caching.

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

Successfully merging a pull request may close this issue.

1 participant