trusted-proxies: trust docker network

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2024-06-14 10:04:01 +02:00
parent cbe0a89676
commit cfbb3484ae
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ done
IPv4_ADDRESS="$(dig "$APACHE_HOST" A +short +search | head -1)" IPv4_ADDRESS="$(dig "$APACHE_HOST" A +short +search | head -1)"
# Bring it in CIDR notation # Bring it in CIDR notation
# shellcheck disable=SC2001 # shellcheck disable=SC2001
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|1/32|')" IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|0/16|')"
if [ -z "$APACHE_PORT" ]; then if [ -z "$APACHE_PORT" ]; then
export APACHE_PORT="443" export APACHE_PORT="443"

View file

@ -567,7 +567,7 @@ fi
IPv4_ADDRESS="$(dig nextcloud-aio-nextcloud A +short +search | head -1)" IPv4_ADDRESS="$(dig nextcloud-aio-nextcloud A +short +search | head -1)"
# Bring it in CIDR notation # Bring it in CIDR notation
# shellcheck disable=SC2001 # shellcheck disable=SC2001
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|1/32|')" IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|0/16|')"
php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS" php /var/www/html/occ config:system:set trusted_proxies 10 --value="$IPv4_ADDRESS"
if [ -n "$ADDITIONAL_TRUSTED_DOMAIN" ]; then if [ -n "$ADDITIONAL_TRUSTED_DOMAIN" ]; then