File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ## Version 2025/06/08 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/tinyauth-location.conf.sample
1+ ## Version 2025/12/17 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/tinyauth-location.conf.sample
2+ # Add headers for Forward Auth
23# Make sure that your tinyauth container is in the same user defined bridge network and is named tinyauth
34# Rename /config/nginx/proxy-confs/tinyauth.subdomain.conf.sample to /config/nginx/proxy-confs/tinyauth.subdomain.conf
45
@@ -7,3 +8,17 @@ auth_request /tinyauth;
78
89## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal
910error_page 401 = @tinyauth_login;
11+
12+ ## Translate the user information response headers from the auth subrequest into variables
13+ auth_request_set $email $upstream_http_remote_email;
14+ auth_request_set $groups $upstream_http_remote_groups;
15+ auth_request_set $name $upstream_http_remote_name;
16+ auth_request_set $user $upstream_http_remote_user;
17+
18+ ## Inject the user information into the request made to the actual upstream
19+ proxy_set_header Remote-Email $email;
20+ proxy_set_header Remote-Groups $groups;
21+ proxy_set_header Remote-Name $name;
22+ proxy_set_header Remote-User $user;
23+
24+ ## Can be extended with more custom headers https://tinyauth.app/docs/reference/headers#nginxnginx-proxy-manager
You can’t perform that action at this time.
0 commit comments