Update Nginx configuration to replace $http_host with $host:$server_port for better compatibility

Signed-off-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
Eric Nemchik
2026-07-18 12:28:50 -05:00
parent bc02502e97
commit 69afc4de58
4 changed files with 7 additions and 7 deletions
@@ -12,7 +12,7 @@ location /tinyauth {
proxy_pass http://$upstream_tinyauth:3000/api/auth/nginx;
proxy_set_header x-forwarded-proto $scheme;
proxy_set_header x-forwarded-host $http_host;
proxy_set_header x-forwarded-host $host:$server_port;
proxy_set_header x-forwarded-uri $request_uri;
}
@@ -21,8 +21,8 @@ location @tinyauth_login {
internal;
## Set the $target_url variable based on the original request
set_escape_uri $target_url $scheme://$http_host$request_uri;
set_escape_uri $target_url $scheme://$host:$server_port$request_uri;
## Set the $signin_url variable
set $domain $host;
if ($host ~* "^[^.]+\.([^.]+\..+)$") {