wisski-cloud-distillery/embed/resources/compose/barrel/wisskiutils/set_trusted_host.sh
Tom Wiesing 2881a5f65c
resolver: Use self-built image
This commit updates the resolver component to use an image that is built
locally.
2022-09-09 18:01:57 +02:00

13 lines
No EOL
524 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="$(hostname -f)"
INSTANCE_DOMAIN="${INSTANCE_DOMAIN%.wisski}"
TRUSTED_HOST_PATTERN="${INSTANCE_DOMAIN//\./\\\\.}"
TRUSTED_HOST_PATTERNS='["'$TRUSTED_HOST_PATTERN'"]'
echo "Setting 'trusted_host_patterns' to $TRUSTED_HOST_PATTERNS"
bash /wisskiutils/settings_php_set.sh 'trusted_host_patterns' "$TRUSTED_HOST_PATTERNS"