set_trusted_host: Fix hostname
This commit is contained in:
parent
e856afdc93
commit
ab05656bfe
1 changed files with 2 additions and 1 deletions
|
|
@ -3,7 +3,8 @@
|
|||
# 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}"
|
||||
INSTANCE_DOMAIN="$(hostname -f)"
|
||||
INSTANCE_DOMAIN="${INSTANCE_DOMAIN%.wisski}"
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue