Skip to content

Commit 3ffa4aa

Browse files
authored
Update tinyauth-location.conf.sample for Forward Auth
Updated version information and added headers for Forward Auth in the tinyauth NGINX configuration.
1 parent bb730cb commit 3ffa4aa

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
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
910
error_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

0 commit comments

Comments
 (0)