@@ -283,7 +283,7 @@ respond and the user will receive a 500 response.
283
283
284
284
# app/config/config.yml
285
285
framework :
286
- trusted_hosts : ['acme .com', 'acme .org']
286
+ trusted_hosts : ['example .com', 'example .org']
287
287
288
288
.. code-block :: xml
289
289
@@ -296,8 +296,8 @@ respond and the user will receive a 500 response.
296
296
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
297
297
298
298
<framework : config >
299
- <trusted-host >acme .com</trusted-host >
300
- <trusted-host >acme .org</trusted-host >
299
+ <trusted-host >example .com</trusted-host >
300
+ <trusted-host >example .org</trusted-host >
301
301
<!-- ... -->
302
302
</framework >
303
303
</container >
@@ -306,17 +306,17 @@ respond and the user will receive a 500 response.
306
306
307
307
// app/config/config.php
308
308
$container->loadFromExtension('framework', array(
309
- 'trusted_hosts' => array('acme .com', 'acme .org'),
309
+ 'trusted_hosts' => array('example .com', 'example .org'),
310
310
));
311
311
312
- Hosts can also be configured using regular expressions (e.g. ``.*\.?acme .com$ ``),
312
+ Hosts can also be configured using regular expressions (e.g. ``.*\.?example .com$ ``),
313
313
which make it easier to respond to any subdomain.
314
314
315
315
In addition, you can also set the trusted hosts in the front controller
316
316
using the ``Request::setTrustedHosts() `` method::
317
317
318
318
// web/app.php
319
- Request::setTrustedHosts(array('.*\.?acme .com$', '.*\.?acme .org$'));
319
+ Request::setTrustedHosts(array('.*\.?example .com$', '.*\.?example .org$'));
320
320
321
321
The default value for this option is an empty array, meaning that the application
322
322
can respond to any given host.
0 commit comments