Fix CSRF not showing the token

This commit is contained in:
Ryan Prather 2024-12-17 11:49:22 -05:00
parent 804652ac67
commit 0ca406f635
2 changed files with 21 additions and 10 deletions

11
config/packages/csrf.yaml Normal file
View File

@ -0,0 +1,11 @@
# Enable stateless CSRF protection for forms and logins/logouts
framework:
form:
csrf_protection:
token_id: submit
csrf_protection:
stateless_token_ids:
- submit
- authenticate
- logout

View File

@ -1,7 +1,7 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
secret: "%env(APP_SECRET)%"
csrf_protection: true
# Note that the session will be started ONLY if you read or write from it.
session: true