mirror of
https://github.com/linuxserver/docker-swag.git
synced 2024-12-11 08:44:43 -05:00
e116a1829e
This adds newer remote credential information from the auth_request headers sent by Authelia, Remote-Name includes the users display name, and Remote-Email includes their email. Additionally it sets the X-Forwarded-Method header to the original $request_method detected by nginx, which is used for the new acl rule method filter.
16 lines
839 B
Plaintext
16 lines
839 B
Plaintext
## Version 2021/04/21 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/authelia-location.conf
|
|
# 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;
|
|
auth_request_set $name $upstream_http_remote_name;
|
|
auth_request_set $email $upstream_http_remote_email;
|
|
proxy_set_header Remote-User $user;
|
|
proxy_set_header Remote-Groups $groups;
|
|
proxy_set_header Remote-Name $name;
|
|
proxy_set_header Remote-Email $email;
|
|
error_page 401 =302 https://$http_host/authelia/?rd=$target_url;
|