Skip to content

Commit 8a71cdf

Browse files
committed
Merge pull request #3114 from Tobion/patch-2
update framework csrf configuration
2 parents 6829df3 + 31fb5b8 commit 8a71cdf

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

reference/configuration/framework.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ Configuration
2020
* `ide`_
2121
* `test`_
2222
* `trusted_proxies`_
23-
* `form`_
24-
* enabled
2523
* `csrf_protection`_
2624
* enabled
27-
* field_name
25+
* field_name (deprecated)
26+
* `form`_
27+
* enabled
28+
* csrf_protection
29+
* enabled
30+
* field_name
2831
* `session`_
2932
* `name`_
3033
* `cookie_lifetime`_
@@ -452,12 +455,16 @@ Full Default Configuration
452455
test: ~
453456
default_locale: en
454457
458+
csrf_protection:
459+
enabled: false
460+
field_name: _token # Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead
461+
455462
# form configuration
456463
form:
457464
enabled: false
458-
csrf_protection:
459-
enabled: false
460-
field_name: _token
465+
csrf_protection:
466+
enabled: true
467+
field_name: ~
461468
462469
# esi configuration
463470
esi:

0 commit comments

Comments
 (0)