@@ -171,7 +171,9 @@ PHP. Have a look at the default configuration:
171
171
app.config :
172
172
charset : UTF-8
173
173
error_handler : null
174
- csrf_secret : xxxxxxxxxx
174
+ csrf_protection :
175
+ enabled : true
176
+ secret : xxxxxxxxxx
175
177
router : { resource: "%kernel.root_dir%/config/routing.yml" }
176
178
validation : { enabled: true, annotations: true }
177
179
templating :
@@ -203,10 +205,11 @@ PHP. Have a look at the default configuration:
203
205
.. code-block :: xml
204
206
205
207
<!-- app/config/config.xml -->
206
- <app : config csrf-secret = " xxxxxxxxxx " charset =" UTF-8" error-handler =" null" >
208
+ <app : config charset =" UTF-8" error-handler =" null" >
207
209
<app : router resource =" %kernel.root_dir%/config/routing.xml" />
208
210
<app : validation enabled =" true" annotations =" true" />
209
211
<app : session default-locale =" en" lifetime =" 3600" />
212
+ <app : csrf-protection enabled =" true" secret =" xxxxxxxxxx" />
210
213
</app : config >
211
214
212
215
<!-- Twig Configuration -->
@@ -235,12 +238,12 @@ PHP. Have a look at the default configuration:
235
238
236
239
// app/config/config.php
237
240
$container->loadFromExtension('app', 'config', array(
238
- 'charset' => 'UTF-8',
239
- 'error_handler' => null,
240
- 'csrf-secret' => ' xxxxxxxxxx',
241
- 'router' => array('resource' => '%kernel.root_dir%/config/routing.php'),
242
- 'validation' => array('enabled' => true, 'annotations' => true),
243
- 'templating' => array(
241
+ 'charset' => 'UTF-8',
242
+ 'error_handler' => null,
243
+ 'csrf-protection' => array('enabled' => true, 'secret' => ' xxxxxxxxxx') ,
244
+ 'router' => array('resource' => '%kernel.root_dir%/config/routing.php'),
245
+ 'validation' => array('enabled' => true, 'annotations' => true),
246
+ 'templating' => array(
244
247
#'assets_version' => "SomeVersionScheme",
245
248
),
246
249
'session' => array(
0 commit comments