Skip to content

Commit 3309ded

Browse files
committed
add to trusted proxies
1 parent a6c70d7 commit 3309ded

File tree

1 file changed

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

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ if [ ! -f "$NOTIFY_PUSH_BIN" ]; then
3131
sleep infinity
3232
fi
3333

34+
# 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"
39+
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
43+
3444
# run notify-push binary
3545
echo "**** Starting notify-push ****"
3646
exec \

0 commit comments

Comments
 (0)