From d07b0fcb01ceed78ccdeabb1e746c2d0304839ec Mon Sep 17 00:00:00 2001 From: Martin Goyot Date: Fri, 25 Dec 2020 19:53:11 +0100 Subject: [PATCH] Update X-Forwarded-For header instead of overriding it When this container is behind a reverse proxy itself it overrides the incoming `X-Forwarded-For` header from the downstream reverse proxy. This is problematic because Snadrop heavily relies on this information to create rooms. --- root/defaults/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/defaults/default b/root/defaults/default index 64d2cc1..2f7bcb4 100644 --- a/root/defaults/default +++ b/root/defaults/default @@ -23,6 +23,6 @@ server { proxy_pass http://localhost:3000; proxy_set_header Connection "upgrade"; proxy_set_header Upgrade $http_upgrade; - proxy_set_header X-Forwarded-for $remote_addr; + proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; } }