From 38528962739903cf0f972d565a3f118662436af8 Mon Sep 17 00:00:00 2001 From: Viyurz Date: Sun, 31 Mar 2024 17:28:53 +0200 Subject: [PATCH] Update NGINX proxy headers. --- roles/reverse-proxy/templates/nginx.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/reverse-proxy/templates/nginx.conf b/roles/reverse-proxy/templates/nginx.conf index 8155e72..277fd3b 100644 --- a/roles/reverse-proxy/templates/nginx.conf +++ b/roles/reverse-proxy/templates/nginx.conf @@ -60,11 +60,13 @@ http { resolver {{ reverse_proxy['resolver'] }}; proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Scheme $scheme; + proxy_set_header X-Forwarded-URI $request_uri; + proxy_set_header X-Real-IP $remote_addr; # Needed to support websocket connections # See: https://nginx.org/en/docs/http/websocket.html