File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,18 @@ for CSRF. In this article you'll learn how you can use it in your login form.
16
16
Configuring CSRF Protection
17
17
---------------------------
18
18
19
- First, configure the Security component so it can use CSRF protection.
20
- The Security component needs a CSRF token provider. You can set this to use the default
21
- provider available in the Security component:
19
+ First, make sure that the CSRF protection is enabled in the main cofiguration
20
+ file:
21
+
22
+ .. code-block :: yaml
23
+
24
+ # app/config/config.yml
25
+ framework :
26
+ # ...
27
+ csrf_protection : ~
28
+
29
+ Then, the security component needs a CSRF token provider. You can set this to
30
+ use the default provider available in the security component:
22
31
23
32
.. configuration-block ::
24
33
@@ -74,7 +83,6 @@ provider available in the Security component:
74
83
75
84
The Security component can be configured further, but this is all information
76
85
it needs to be able to use CSRF in the login form.
77
- Note: Make sure that CSRF Protection is enabled in ``config.yml ``.
78
86
79
87
Rendering the CSRF field
80
88
------------------------
You can’t perform that action at this time.
0 commit comments