- Learning Drupal 8
- Nick Abbott Richard Jones
- 80字
- 2025-02-23 11:14:04
Trusted host patterns
If you visit the page /admin/reports/status then you will see a warning informing you that Trusted Host Settings are not enabled.
Drupal 8 use a trusted host mechanism, where site administrators can whitelist hostnames. The mechanism now can be configured in the settings.php
file.
Setting the pattern as show here will inform Drupal that all sites hosted locally using the Dev Desktop – this with a URL ending in '.dd' - are trusted.
$settings['trusted_host_patterns'] = array( '^.*\.dd$', );