|
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 |
2 | 2 | # Make sure that your authelia container is in the same user defined bridge network and is named authelia
|
3 | 3 | # Rename /config/nginx/proxy-confs/authelia.subdomain.conf.sample to /config/nginx/proxy-confs/authelia.subdomain.conf
|
4 | 4 | # For authelia 4.37 and below, make sure that the authelia configuration.yml has 'path: "authelia"' defined
|
|
7 | 7 | # location for authelia subfolder requests
|
8 | 8 | location ^~ /authelia {
|
9 | 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 | + |
10 | 21 | include /config/nginx/proxy.conf;
|
11 | 22 | include /config/nginx/resolver.conf;
|
12 | 23 | set $upstream_authelia authelia;
|
13 | 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 ""; |
14 | 32 | }
|
15 | 33 |
|
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 { |
18 | 36 | internal;
|
19 | 37 |
|
20 | 38 | include /config/nginx/proxy.conf;
|
|
0 commit comments