Skip to content

Commit 13ede8e

Browse files
authored
Merge pull request #467 from linuxserver/authelia-auth-endpoints
another authelia auth endpoint adjustment
2 parents a00d272 + a9391d0 commit 13ede8e

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

root/defaults/nginx/authelia-server.conf.sample

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2024/03/14 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample
1+
## Version 2024/03/16 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample
22
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
33
# Rename /config/nginx/proxy-confs/authelia.subdomain.conf.sample to /config/nginx/proxy-confs/authelia.subdomain.conf
44
# For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
@@ -7,14 +7,32 @@
77
# location for authelia subfolder requests
88
location ^~ /authelia {
99
auth_request off; # requests to this subfolder must be accessible without authentication
10+
11+
include /config/nginx/proxy.conf;
12+
include /config/nginx/resolver.conf;
13+
set $upstream_authelia authelia;
14+
proxy_pass http://$upstream_authelia:9091;
15+
}
16+
17+
# location for authelia 4.37 and below auth requests
18+
location = /authelia/api/verify {
19+
internal;
20+
1021
include /config/nginx/proxy.conf;
1122
include /config/nginx/resolver.conf;
1223
set $upstream_authelia authelia;
1324
proxy_pass http://$upstream_authelia:9091;
25+
26+
## Include the Set-Cookie header if present
27+
auth_request_set $set_cookie $upstream_http_set_cookie;
28+
add_header Set-Cookie $set_cookie;
29+
30+
proxy_pass_request_body off;
31+
proxy_set_header Content-Length "";
1432
}
1533

16-
# location for authelia auth requests
17-
location ~ /authelia/api/(authz/auth-request|verify) {
34+
# location for authelia 4.38 and above auth requests
35+
location = /authelia/api/authz/auth-request {
1836
internal;
1937

2038
include /config/nginx/proxy.conf;

root/defaults/nginx/authentik-server.conf.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# location for authentik subfolder requests
66
location ^~ /outpost.goauthentik.io {
77
auth_request off; # requests to this subfolder must be accessible without authentication
8+
89
include /config/nginx/proxy.conf;
910
include /config/nginx/resolver.conf;
1011
set $upstream_authentik authentik-server;

0 commit comments

Comments
 (0)