Closed jenlampton closed 2 years ago
This surprised me a little because I wasn't expecting pantheon to apply changes to the settings.php
file in an update, but it looks like it does.
According to https://github.com/pantheon-systems/drops-8/blob/233160dc7e502f9742f87dc710cac43afa813c7f/sites/default/settings.pantheon.php#L179 we can just allow all domains and this would avoid the headache:
/**
* "Trusted host settings" are not necessary on Pantheon; traffic will only
* be routed to your site if the host settings match a domain configured for
* your site in the dashboard.
*/
if (isset($_ENV['PANTHEON_ENVIRONMENT'])) {
$settings['trusted_host_patterns'][] = '.*';
}
@jenlampton I've got a new PR. Pantheon says trust_host_patterns not needed.
I notice that we introduced to set trusted host patterns for pantheon domains:
The problem with this is that it can cause immediate downtime for live sites, after updating to the version where this was added.
From a client:
I think we need to add an
if isset($settings['trusted_host_patterns'])
before we add the pantheon domains, so that this setting remains optional for sites that didn't have any domains defined before.