Skip to content

Commit 833e803

Browse files
committed
add ::1 to trusted proxies as well
1 parent 6c27310 commit 833e803

File tree

1 file changed

+9
-7
lines changed
  • root/etc/s6-overlay/s6-rc.d/svc-mod-nextcloud-notify-push

1 file changed

+9
-7
lines changed

root/etc/s6-overlay/s6-rc.d/svc-mod-nextcloud-notify-push/run

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@ if [ ! -f "$NOTIFY_PUSH_BIN" ]; then
3232
fi
3333

3434
# add to trusted proxies
35-
if ! occ config:system:get trusted_proxies | grep -q "127.0.0.1"; then
36-
NO_OF_PROXIES=$(occ config:system:get trusted_proxies --output=json | jq 'length')
37-
if [[ -z "${NO_OF_PROXIES}" ]]; then
38-
NO_OF_PROXIES="0"
35+
for PROXY in '127.0.0.1' '::1'; do
36+
if ! occ config:system:get trusted_proxies | grep -q "${PROXY}"; then
37+
NO_OF_PROXIES=$(occ config:system:get trusted_proxies --output=json | jq 'length')
38+
if [[ -z "${NO_OF_PROXIES}" ]]; then
39+
NO_OF_PROXIES="0"
40+
fi
41+
echo "**** Adding notify_push (${PROXY}) to trusted proxies ****"
42+
occ config:system:set trusted_proxies "${NO_OF_PROXIES}" --value="${PROXY}"
3943
fi
40-
echo "**** Adding notify_push to trusted proxies ****"
41-
occ config:system:set trusted_proxies "${NO_OF_PROXIES}" --value=127.0.0.1
42-
fi
44+
done
4345

4446
# run notify-push binary
4547
echo "**** Starting notify-push ****"

0 commit comments

Comments
 (0)