mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00:00
fix notify-push trusted proxies
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
3052915de4
commit
62c7e3f133
2 changed files with 7 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ RUN set -ex; \
|
||||||
tzdata \
|
tzdata \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
openssl \
|
openssl \
|
||||||
|
bind-tools \
|
||||||
netcat-openbsd; \
|
netcat-openbsd; \
|
||||||
\
|
\
|
||||||
sed -i \
|
sed -i \
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,11 @@ while ! nc -z "$NEXTCLOUD_HOST" 9000; do
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Get ipv4-address of Apache
|
||||||
|
IPv4_ADDRESS="$(dig nextcloud-aio-apache A +short | head -1)"
|
||||||
|
# Bring it in CIDR notation
|
||||||
|
IPv4_ADDRESS="$(echo "$IPv4_ADDRESS" | sed 's|[0-9]\+$|1/32|')"
|
||||||
|
|
||||||
if [ -z "$APACHE_PORT" ]; then
|
if [ -z "$APACHE_PORT" ]; then
|
||||||
export APACHE_PORT="443"
|
export APACHE_PORT="443"
|
||||||
fi
|
fi
|
||||||
|
|
@ -41,7 +46,7 @@ echo "$CADDYFILE" > /tmp/Caddyfile
|
||||||
if [ "$APACHE_PORT" != '443' ]; then
|
if [ "$APACHE_PORT" != '443' ]; then
|
||||||
CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /tmp/Caddyfile)"
|
CADDYFILE="$(sed 's|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /tmp/Caddyfile)"
|
||||||
else
|
else
|
||||||
CADDYFILE="$(sed 's|trusted_proxies.*private_ranges|# trusted_proxies placeholder|' /tmp/Caddyfile)"
|
CADDYFILE="$(sed "s|# trusted_proxies placeholder|trusted_proxies static $IPv4_ADDRESS|" /tmp/Caddyfile)"
|
||||||
fi
|
fi
|
||||||
echo "$CADDYFILE" > /tmp/Caddyfile
|
echo "$CADDYFILE" > /tmp/Caddyfile
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue