wisski-cloud-distillery/distillery/utils/set_trusted_host.sh
Tom Wiesing e856afdc93
Rename composer hostnames
Previously, all containers had hostnames corresponding to their domains.
This made it impossible to use curl and friends from within the
containers. This commit renames the hostnames of the containers to
append a '.wisski' suffix.
2020-11-12 18:59:09 +01:00

10 lines
No EOL
458 B
Bash
Executable file

#!/bin/bash
# This utility script can be used to configure the trusted host settings inside of settings.php.
# It doesn't take care of corner cases and should only be used when needed.
INSTANCE_DOMAIN="${VIRTUAL_HOST}"
chmod u+w web/sites/default/settings.php
echo "" >> web/sites/default/settings.php
echo "\$settings['trusted_host_patterns'] = ['${INSTANCE_DOMAIN//\./\\\.}'];" >> web/sites/default/settings.php
chmod u-w web/sites/default/settings.php