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$',
  );

Get Drupal 8: Enterprise Web Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.