File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ RUN set -ex; \
30
30
tzdata \
31
31
ca-certificates \
32
32
openssl \
33
+ bind-tools \
33
34
netcat-openbsd; \
34
35
\
35
36
sed -i \
Original file line number Diff line number Diff line change @@ -17,6 +17,12 @@ while ! nc -z "$NEXTCLOUD_HOST" 9000; do
17
17
sleep 5
18
18
done
19
19
20
+ # Get ipv4-address of Apache
21
+ IPv4_ADDRESS=" $( dig nextcloud-aio-apache A +short | head -1) "
22
+ # Bring it in CIDR notation
23
+ # shellcheck disable=SC2001
24
+ IPv4_ADDRESS=" $( echo " $IPv4_ADDRESS " | sed ' s|[0-9]\+$|1/32|' ) "
25
+
20
26
if [ -z " $APACHE_PORT " ]; then
21
27
export APACHE_PORT=" 443"
22
28
fi
@@ -41,7 +47,7 @@ echo "$CADDYFILE" > /tmp/Caddyfile
41
47
if [ " $APACHE_PORT " != ' 443' ]; then
42
48
CADDYFILE=" $( sed ' s|# trusted_proxies placeholder|trusted_proxies static private_ranges|' /tmp/Caddyfile) "
43
49
else
44
- CADDYFILE=" $( sed ' s|trusted_proxies.*private_ranges| # trusted_proxies placeholder|' /tmp/Caddyfile) "
50
+ CADDYFILE=" $( sed " s| # trusted_proxies placeholder|trusted_proxies static $IPv4_ADDRESS | " /tmp/Caddyfile) "
45
51
fi
46
52
echo " $CADDYFILE " > /tmp/Caddyfile
47
53
You can’t perform that action at this time.
0 commit comments