Commit e95d75d2 authored by omega8cc's avatar omega8cc

Drupal 8 requires trusted_host_patterns defined in settings.php

parent ffe6b7ce
...@@ -167,6 +167,23 @@ if (isset($_SERVER['db_name'])) { ...@@ -167,6 +167,23 @@ if (isset($_SERVER['db_name'])) {
*/ */
$settings['container_yamls'][] = __DIR__ . '/services.yml'; $settings['container_yamls'][] = __DIR__ . '/services.yml';
/**
* Trusted Host Settings support.
*/
$settings['trusted_host_patterns'] = array(
<?php
$esc_uri = str_replace('.', '\.', $this->uri);
print " '^{$esc_uri}\$',\n";
foreach ($this->aliases as $alias_url) {
$esc_alias = str_replace('.', '\.', $alias_url);
print " '^{$esc_alias}\$',\n";
}
?>
'^localhost$',
'^localhost\.*',
'\.local$',
);
<?php print $extra_config; ?> <?php print $extra_config; ?>
# Additional host wide configuration settings. Useful for safely specifying configuration settings. # Additional host wide configuration settings. Useful for safely specifying configuration settings.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment