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.
362
362
'trusted_hosts' => array('example.com', 'example.org'),
363
363
));
364
364
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$ ``),
366
366
which make it easier to respond to any subdomain.
367
367
368
368
In addition, you can also set the trusted hosts in the front controller
369
369
using the ``Request::setTrustedHosts() `` method::
370
370
371
371
// web/app.php
372
- Request::setTrustedHosts(array('.*\. ?example.com$', '.*\. ?example.org$'));
372
+ Request::setTrustedHosts(array('^(.+\.) ?example.com$', '^(.+\.) ?example.org$'));
373
373
374
374
The default value for this option is an empty array, meaning that the application
375
375
can respond to any given host.
You can’t perform that action at this time.
0 commit comments