File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ to do anything to be protected against CSRF attacks.
102102
103103.. _form-csrf-customization :
104104
105- By default Symfony adds the CSRF token in a hidden field called ``_csrf_token ``, but
105+ By default Symfony adds the CSRF token in a hidden field called ``_token ``, but
106106this can be customized (1) globally for all forms and (2) on a form-by-form basis.
107107Globally, you can configure it under the ``framework.form `` option:
108108
@@ -151,7 +151,7 @@ method of each form::
151151 // enable/disable CSRF protection for this form
152152 'csrf_protection' => true,
153153 // the name of the hidden HTML field that stores the token
154- 'csrf_field_name' => '_token ',
154+ 'csrf_field_name' => 'custom_token_name ',
155155 // an arbitrary string used to generate the value of the token
156156 // using a different string for each form improves its security
157157 // when using stateful tokens (which is the default)
You can’t perform that action at this time.
0 commit comments