Skip to content

Commit b06f1ce

Browse files
Move stateless CSRF config to packages/csrf.yaml
1 parent fc87603 commit b06f1ce

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Enable stateless CSRF protection for forms and logins/logouts
2+
framework:
3+
form:
4+
csrf_protection:
5+
token_id: submit
6+
7+
csrf_protection:
8+
stateless_token_ids:
9+
- submit
10+
- authenticate
11+
- logout

symfony/form/7.2/manifest.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"copy-from-recipe": {
3+
"config/": "%CONFIG_DIR%/"
4+
}
5+
}

symfony/framework-bundle/7.2/config/packages/framework.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ framework:
88
#esi: true
99
#fragments: true
1010

11-
# Enable stateless CSRF protection for forms and logins/logouts
12-
form: { csrf_protection: { token_id: submit } }
13-
csrf_protection:
14-
stateless_token_ids: [submit, authenticate, logout]
15-
1611
when@test:
1712
framework:
1813
test: true

0 commit comments

Comments
 (0)