From 3ffa4aaa770d2c0955a4738a596e26b6591f5674 Mon Sep 17 00:00:00 2001 From: Jonathan Ma Date: Wed, 17 Dec 2025 15:28:03 -0500 Subject: [PATCH 1/2] Update tinyauth-location.conf.sample for Forward Auth Updated version information and added headers for Forward Auth in the tinyauth NGINX configuration. --- .../nginx/tinyauth-location.conf.sample | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/root/defaults/nginx/tinyauth-location.conf.sample b/root/defaults/nginx/tinyauth-location.conf.sample index 3bdae98..64654bc 100644 --- a/root/defaults/nginx/tinyauth-location.conf.sample +++ b/root/defaults/nginx/tinyauth-location.conf.sample @@ -1,4 +1,5 @@ -## Version 2025/06/08 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/tinyauth-location.conf.sample +## Version 2025/12/17 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/tinyauth-location.conf.sample +# Add headers for Forward Auth # Make sure that your tinyauth container is in the same user defined bridge network and is named tinyauth # Rename /config/nginx/proxy-confs/tinyauth.subdomain.conf.sample to /config/nginx/proxy-confs/tinyauth.subdomain.conf @@ -7,3 +8,17 @@ auth_request /tinyauth; ## If the subreqest returns 200 pass to the backend, if the subrequest returns 401 redirect to the portal error_page 401 = @tinyauth_login; + +## Translate the user information response headers from the auth subrequest into variables +auth_request_set $email $upstream_http_remote_email; +auth_request_set $groups $upstream_http_remote_groups; +auth_request_set $name $upstream_http_remote_name; +auth_request_set $user $upstream_http_remote_user; + +## Inject the user information into the request made to the actual upstream +proxy_set_header Remote-Email $email; +proxy_set_header Remote-Groups $groups; +proxy_set_header Remote-Name $name; +proxy_set_header Remote-User $user; + +## Can be extended with more custom headers https://tinyauth.app/docs/reference/headers#nginxnginx-proxy-manager From e39c6487f7e3761fd94129f6461761b721527886 Mon Sep 17 00:00:00 2001 From: Jonathan Ma Date: Sat, 11 Jul 2026 12:58:10 -0400 Subject: [PATCH 2/2] Update root/defaults/nginx/tinyauth-location.conf.sample Co-authored-by: Eric Nemchik --- root/defaults/nginx/tinyauth-location.conf.sample | 1 - 1 file changed, 1 deletion(-) diff --git a/root/defaults/nginx/tinyauth-location.conf.sample b/root/defaults/nginx/tinyauth-location.conf.sample index 64654bc..f829c6d 100644 --- a/root/defaults/nginx/tinyauth-location.conf.sample +++ b/root/defaults/nginx/tinyauth-location.conf.sample @@ -1,5 +1,4 @@ ## Version 2025/12/17 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/tinyauth-location.conf.sample -# Add headers for Forward Auth # Make sure that your tinyauth container is in the same user defined bridge network and is named tinyauth # Rename /config/nginx/proxy-confs/tinyauth.subdomain.conf.sample to /config/nginx/proxy-confs/tinyauth.subdomain.conf