Skip to content

Conversation

yawaramin
Copy link
Contributor

Recommend using a form with a hidden input or an adjacent CSRF token in the header. Stop recommending a global token in the html or body tags as those may not work with hx-boost.

Fix #3379

@alexpetros
Copy link
Collaborator

Would you mind not doing the rewrite and instead just adding a note to the effect of "Note that hx-boost does not not update the <html> or <body> tags; if using this feature with hx-boost, make sure to include the CSRF token on an element that will get replaced."

@alexpetros
Copy link
Collaborator

Awesome, thanks @yawaramin :)

@alexpetros alexpetros merged commit d818268 into bigskysoftware:master Jul 22, 2025
1 check passed
@sabiwara
Copy link

sabiwara commented Jul 22, 2025

Thank you @yawaramin @alexpetros ! 💜

@yawaramin yawaramin deleted the csrf-doc branch July 22, 2025 02:59
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 this pull request may close these issues.

CSRF prevention documentation might need clarification when used with hx-boost
3 participants