Add set_trusted_host utility script
This commit is contained in:
parent
19b584408d
commit
3acc92b85c
1 changed files with 10 additions and 0 deletions
10
distillery/utils/set_trusted_host.sh
Executable file
10
distillery/utils/set_trusted_host.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/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="$(hostname -f)"
|
||||||
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue