Skip to content

Commit

Permalink
Enable CSRF protection only when security-csrf is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 20, 2024
1 parent 8d53c58 commit db60967
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion symfony/framework-bundle/7.2/config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ framework:
#fragments: true

# Enable stateless CSRF protection for forms and logins/logouts
form: { csrf_protection: { token_id: submit } }
form:
csrf_protection:
enabled: null
token_id: submit
csrf_protection:
enabled: null
stateless_token_ids: [submit, authenticate, logout]

when@test:
Expand Down

0 comments on commit db60967

Please sign in to comment.