mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 15:16:30 +03:00
Move stateless CSRF config to packages/csrf.yaml
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/"
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,6 @@ framework:
|
||||
#esi: true
|
||||
#fragments: true
|
||||
|
||||
# Enable stateless CSRF protection for forms and logins/logouts
|
||||
form: { csrf_protection: { token_id: submit } }
|
||||
csrf_protection:
|
||||
stateless_token_ids: [submit, authenticate, logout]
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
|
||||
Reference in New Issue
Block a user