Fix X-Auth-Request-Redirect value to reflect the request uri
@@ -669,6 +669,7 @@ stream {
proxy_pass_request_headers on;
proxy_set_header Host {{ $location.ExternalAuth.Host }};
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
+ proxy_set_header X-Auth-Request-Redirect $request_uri;
proxy_ssl_server_name on;
client_max_body_size "{{ $location.Proxy.BodySize }}";
@@ -780,9 +781,6 @@ stream {
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Scheme $pass_access_scheme;
- {{/* This header is used for external authentication */}}
- proxy_set_header X-Auth-Request-Redirect $request_uri;
-
# mitigate HTTPoxy Vulnerability
# https://www.nginx.com/blog/mitigating-the-httpoxy-vulnerability-with-nginx/
proxy_set_header Proxy "";
