helm - allow to define an additional_trusted_proxy

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-11-21 17:34:37 +01:00
parent 5a385ebdd3
commit 89a87d8b60
2 changed files with 11 additions and 0 deletions

View file

@ -516,6 +516,9 @@ fi
chmod 775 -R /var/www/html/custom_apps/notify_push/bin/
php /var/www/html/occ config:system:set trusted_proxies 0 --value="127.0.0.1"
php /var/www/html/occ config:system:set trusted_proxies 1 --value="::1"
if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
php /var/www/html/occ config:system:set trusted_proxies 2 --value="$ADDITIONAL_TRUSTED_PROXY"
fi
php /var/www/html/occ config:app:set notify_push base_endpoint --value="https://$NC_DOMAIN/push"
# Collabora
@ -561,6 +564,11 @@ if [ "$COLLABORA_ENABLED" = 'yes' ]; then
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$PRIVATE_IP_RANGES"; then
COLLABORA_ALLOW_LIST+=",$PRIVATE_IP_RANGES"
fi
if [ -n "$ADDITIONAL_TRUSTED_PROXY" ]; then
if ! echo "$COLLABORA_ALLOW_LIST" | grep -q "$ADDITIONAL_TRUSTED_PROXY"; then
COLLABORA_ALLOW_LIST+=",$ADDITIONAL_TRUSTED_PROXY"
fi
fi
php /var/www/html/occ config:app:set richdocuments wopi_allowlist --value="$COLLABORA_ALLOW_LIST"
else
echo "Warning: wopi_allowlist is empty which should not be the case!"