2021-10-14 15:01:48 -04:00
|
|
|
## Version 2022/08/20 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/authelia-location.conf.sample
|
2020-08-03 11:00:14 -04:00
|
|
|
# Make sure that your authelia container is in the same user defined bridge network and is named authelia
|
|
|
|
# Make sure that the authelia configuration.yml has 'path: "authelia"' defined
|
|
|
|
|
|
|
|
auth_request /authelia/api/verify;
|
|
|
|
auth_request_set $target_url $scheme://$http_host$request_uri;
|
|
|
|
auth_request_set $user $upstream_http_remote_user;
|
|
|
|
auth_request_set $groups $upstream_http_remote_groups;
|
2021-04-20 23:17:25 -04:00
|
|
|
auth_request_set $name $upstream_http_remote_name;
|
|
|
|
auth_request_set $email $upstream_http_remote_email;
|
2020-08-03 11:00:14 -04:00
|
|
|
proxy_set_header Remote-User $user;
|
|
|
|
proxy_set_header Remote-Groups $groups;
|
2021-04-20 23:17:25 -04:00
|
|
|
proxy_set_header Remote-Name $name;
|
|
|
|
proxy_set_header Remote-Email $email;
|
2020-08-03 11:00:14 -04:00
|
|
|
error_page 401 =302 https://$http_host/authelia/?rd=$target_url;
|