From 732cfde2abf89067aa8a382dd99f7210c9296d6f Mon Sep 17 00:00:00 2001 From: Nikolay Arhipov Date: Fri, 9 Aug 2024 16:43:34 +0300 Subject: [PATCH] Migrate to new authelia api --- .../var/lib/docker-services/volumes/dovecot/authelia.sh | 6 +++--- .../root/var/lib/docker-services/volumes/sftpd/authelia.sh | 4 ++-- .../root/var/lib/docker-services/volumes/init-hass/auth.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/system/modules/server/files/root/var/lib/docker-services/volumes/dovecot/authelia.sh b/system/modules/server/files/root/var/lib/docker-services/volumes/dovecot/authelia.sh index e3fde946..dd837a2c 100755 --- a/system/modules/server/files/root/var/lib/docker-services/volumes/dovecot/authelia.sh +++ b/system/modules/server/files/root/var/lib/docker-services/volumes/dovecot/authelia.sh @@ -32,8 +32,8 @@ fi # Verify that user has access to FORWARDED_HOST curl -sf \ -b "$cookie" \ - -H 'X-Original-Url: '$FORWARDED_HOST'' -H 'X-Forwarded-Method: GET' \ - "$AUTHELIA_URL/api/verify" + -H "X-Original-URL: $FORWARDED_HOST" -H 'X-Original-Method: GET' \ + "$AUTHELIA_URL/api/authz/auth-request" echo "Auth verify ok" -exit 0 \ No newline at end of file +exit 0 diff --git a/system/modules/server/files/root/var/lib/docker-services/volumes/sftpd/authelia.sh b/system/modules/server/files/root/var/lib/docker-services/volumes/sftpd/authelia.sh index e2821749..0860edf6 100755 --- a/system/modules/server/files/root/var/lib/docker-services/volumes/sftpd/authelia.sh +++ b/system/modules/server/files/root/var/lib/docker-services/volumes/sftpd/authelia.sh @@ -32,7 +32,7 @@ fi # Verify that user has access to FORWARDED_HOST curl -sf \ -b "$cookie" \ - -H 'X-Original-Url: '$FORWARDED_HOST'' -H 'X-Forwarded-Method: GET' \ - "$AUTHELIA_URL/api/verify" + -H "X-Original-URL: $FORWARDED_HOST" -H 'X-Original-Method: GET' \ + "$AUTHELIA_URL/api/authz/auth-request" exit 0 diff --git a/system/modules/server/rpi2b/root/var/lib/docker-services/volumes/init-hass/auth.sh b/system/modules/server/rpi2b/root/var/lib/docker-services/volumes/init-hass/auth.sh index 89676fb0..1d19c922 100755 --- a/system/modules/server/rpi2b/root/var/lib/docker-services/volumes/init-hass/auth.sh +++ b/system/modules/server/rpi2b/root/var/lib/docker-services/volumes/init-hass/auth.sh @@ -31,8 +31,8 @@ fi # Verify that user has access to FORWARDED_HOST curl -sf \ -b "$cookie" \ - -H 'X-Original-Url: '$FORWARDED_HOST'' -H 'X-Forwarded-Method: GET' \ - "$AUTHELIA_URL/api/verify" + -H "X-Original-URL: $FORWARDED_HOST" -H 'X-Original-Method: GET' \ + "$AUTHELIA_URL/api/authz/auth-request" # Get display name response="$(curl -sf \