diff --git a/15.0-rc/apache/entrypoint.sh b/15.0-rc/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0-rc/apache/entrypoint.sh +++ b/15.0-rc/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/15.0-rc/fpm-alpine/entrypoint.sh b/15.0-rc/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0-rc/fpm-alpine/entrypoint.sh +++ b/15.0-rc/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/15.0-rc/fpm/entrypoint.sh b/15.0-rc/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0-rc/fpm/entrypoint.sh +++ b/15.0-rc/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/15.0/apache/entrypoint.sh b/15.0/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0/apache/entrypoint.sh +++ b/15.0/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/15.0/fpm-alpine/entrypoint.sh b/15.0/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0/fpm-alpine/entrypoint.sh +++ b/15.0/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/15.0/fpm/entrypoint.sh b/15.0/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/15.0/fpm/entrypoint.sh +++ b/15.0/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0-rc/apache/entrypoint.sh b/16.0-rc/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0-rc/apache/entrypoint.sh +++ b/16.0-rc/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0-rc/fpm-alpine/entrypoint.sh b/16.0-rc/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0-rc/fpm-alpine/entrypoint.sh +++ b/16.0-rc/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0-rc/fpm/entrypoint.sh b/16.0-rc/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0-rc/fpm/entrypoint.sh +++ b/16.0-rc/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0/apache/entrypoint.sh b/16.0/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0/apache/entrypoint.sh +++ b/16.0/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0/fpm-alpine/entrypoint.sh b/16.0/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0/fpm-alpine/entrypoint.sh +++ b/16.0/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/16.0/fpm/entrypoint.sh b/16.0/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/16.0/fpm/entrypoint.sh +++ b/16.0/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0-rc/apache/entrypoint.sh b/17.0-rc/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0-rc/apache/entrypoint.sh +++ b/17.0-rc/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0-rc/fpm-alpine/entrypoint.sh b/17.0-rc/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0-rc/fpm-alpine/entrypoint.sh +++ b/17.0-rc/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0-rc/fpm/entrypoint.sh b/17.0-rc/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0-rc/fpm/entrypoint.sh +++ b/17.0-rc/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0/apache/entrypoint.sh b/17.0/apache/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0/apache/entrypoint.sh +++ b/17.0/apache/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0/fpm-alpine/entrypoint.sh b/17.0/fpm-alpine/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0/fpm-alpine/entrypoint.sh +++ b/17.0/fpm-alpine/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/17.0/fpm/entrypoint.sh b/17.0/fpm/entrypoint.sh index 9514d881..d30b94e1 100755 --- a/17.0/fpm/entrypoint.sh +++ b/17.0/fpm/entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 9514d881..d30b94e1 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -125,6 +125,15 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP NC_TRUSTED_DOMAIN_IDX=$(($NC_TRUSTED_DOMAIN_IDX+1)) done fi + if [ -n "${NEXTCLOUD_TRUSTED_PROXIES+x}" ]; then + echo "setting trusted proxies…" + NC_TRUSTED_PROXIES_IDX=1 + for PROXY in $NEXTCLOUD_TRUSTED_PROXIES ; do + PROXY=$(echo "$PROXY" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') + run_as "php /var/www/html/occ config:system:set trusted_proxies $NC_TRUSTED_PROXIES_IDX --value=$PROXY" + NC_TRUSTED_PROXIES_IDX=$(($NC_TRUSTED_PROXIES_IDX+1)) + done + fi else echo "running web-based installer on first connect!" fi