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.
1616Configuring CSRF Protection
1717---------------------------
1818
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:
2231
2332.. configuration-block ::
2433
@@ -74,7 +83,6 @@ provider available in the Security component:
7483
7584 The Security component can be configured further, but this is all information
7685it needs to be able to use CSRF in the login form.
77- Note: Make sure that CSRF Protection is enabled in ``config.yml ``.
7886
7987Rendering the CSRF field
8088------------------------
You can’t perform that action at this time.
0 commit comments