Skip to content

Commit f114a89

Browse files
authored
LDP-1237: Auto-configure trusted-host settings with ENV variables set by drunomics/multisite-request-matcher package. (#46)
* LDP-1237: Auto-configure trusted-host settings with ENV variables set by drunomics/multisite-request-matcher package. * LDP-1237: Auto-configure trusted-host settings with ENV variables set by drunomics/multisite-request-matcher package 2.
1 parent 08f5002 commit f114a89

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

web/sites/all/base.settings.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
// Auto-configure trusted-hosts-pattern based upon the env-vars
4+
// set by drunomics/multisite-request-matcher package.
5+
if ($host = getenv('SITE_HOST')) {
6+
$settings['trusted_host_patterns'][] = "^(.+\.)?" . $host . "$";
7+
}
8+
39
$settings['config_sync_directory'] = '../config/sync';
410

511
// Set active split configuration.

0 commit comments

Comments
 (0)