Skip to content

Conversation

94noni
Copy link
Contributor

@94noni 94noni commented Aug 18, 2025

No description provided.

@carsonbot carsonbot changed the title Update security.rst related to stateless JS csrf Update security.rst related to stateless JS csrf Aug 18, 2025
Comment on lines +1024 to +1026
the ``data-controller`` part is related to the usage of
https://symfony.com/doc/current/security/csrf.html#generating-csrf-token-using-javascript
It can be removed if you use statefull session storage, not stateless.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's useful to hint this can be removed. But it's always good to explain why the attribute is here:

Suggested change
the ``data-controller`` part is related to the usage of
https://symfony.com/doc/current/security/csrf.html#generating-csrf-token-using-javascript
It can be removed if you use statefull session storage, not stateless.
The ``data-controller`` attribute is needed for [internal link here, not absolute URL].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I agree, I can rework it if its accepted
my point was mostly to document why this data attribute is here in the doc (and also on console maker processes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants