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 @@ -362,14 +362,14 @@ respond and the user will receive a 500 response.
362362 'trusted_hosts' => array('example.com', 'example.org'),
363363 ));
364364
365- Hosts can also be configured using regular expressions (e.g. ``.*\. ?example.com$ ``),
365+ Hosts can also be configured using regular expressions (e.g. ``^(.+\.) ?example.com$ ``),
366366which make it easier to respond to any subdomain.
367367
368368In addition, you can also set the trusted hosts in the front controller
369369using the ``Request::setTrustedHosts() `` method::
370370
371371 // web/app.php
372- Request::setTrustedHosts(array('.*\. ?example.com$', '.*\. ?example.org$'));
372+ Request::setTrustedHosts(array('^(.+\.) ?example.com$', '^(.+\.) ?example.org$'));
373373
374374The default value for this option is an empty array, meaning that the application
375375can respond to any given host.
You can’t perform that action at this time.
0 commit comments