Skip to content

Commit 54ed99d

Browse files
authored
Merge pull request #554 from linuxserver/remove-old-authelia
chore: ⚰️ remove authelia 4.37 and below comments
2 parents a3f7289 + 8b8d33a commit 54ed99d

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed

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

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
## Version 2024/03/14 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-location.conf.sample
1+
## Version 2025/03/25 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-location.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
4-
# For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
5-
# For authelia 4.38 and above, make sure that the authelia configuration.yml has 'address: "tcp://:9091/authelia"' defined
64

75
## Send a subrequest to Authelia to verify if the user is authenticated and has permission to access the resource
8-
## For authelia 4.37 and below, use the following line
9-
# auth_request /authelia/api/verify;
10-
## For authelia 4.38 and above, use the following line
116
auth_request /authelia/api/authz/auth-request;
127

138
## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,15 @@
1-
## Version 2024/03/16 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-server.conf.sample
1+
## Version 2025/03/25 - 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
4-
# For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
5-
# For authelia 4.38 and above, make sure that the authelia configuration.yml has 'address: "tcp://:9091/authelia"' defined
64

7-
# location for authelia subfolder requests
8-
location ^~ /authelia {
9-
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-
21-
include /config/nginx/proxy.conf;
22-
include /config/nginx/resolver.conf;
23-
set $upstream_authelia authelia;
24-
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 "";
32-
}
33-
34-
# location for authelia 4.38 and above auth requests
5+
# location for authelia auth requests
356
location = /authelia/api/authz/auth-request {
367
internal;
378

389
include /config/nginx/proxy.conf;
3910
include /config/nginx/resolver.conf;
4011
set $upstream_authelia authelia;
41-
proxy_pass http://$upstream_authelia:9091;
12+
proxy_pass http://$upstream_authelia:9091/api/authz/auth-request;
4213

4314
## Include the Set-Cookie header if present
4415
auth_request_set $set_cookie $upstream_http_set_cookie;
@@ -62,11 +33,6 @@ location @authelia_proxy_signin {
6233
## Translate the Location response header from the auth subrequest into a variable
6334
auth_request_set $signin_url $upstream_http_location;
6435

65-
if ($signin_url = '') {
66-
## Set the $signin_url variable
67-
set $signin_url https://$http_host/authelia/?rd=$target_url;
68-
}
69-
7036
## Redirect to login
7137
return 302 $signin_url;
7238
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2023/04/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample
1+
## Version 2025/03/25 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authentik-server.conf.sample
22
# Make sure that your authentik container is in the same user defined bridge network and is named authentik-server
33
# Rename /config/nginx/proxy-confs/authentik.subdomain.conf.sample to /config/nginx/proxy-confs/authentik.subdomain.conf
44

@@ -19,7 +19,7 @@ location = /outpost.goauthentik.io/auth/nginx {
1919
include /config/nginx/proxy.conf;
2020
include /config/nginx/resolver.conf;
2121
set $upstream_authentik authentik-server;
22-
proxy_pass http://$upstream_authentik:9000;
22+
proxy_pass http://$upstream_authentik:9000/outpost.goauthentik.io/auth/nginx;
2323

2424
## Include the Set-Cookie header if present
2525
auth_request_set $set_cookie $upstream_http_set_cookie;

0 commit comments

Comments
 (0)