From 998e824bd84680fab4f815d8116fada9952ab0e4 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Tue, 15 Dec 2020 15:01:37 +0100 Subject: [PATCH] Add IP forwarding headers to nginx config (fixes #1318) --- ansible/templates/nginx.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index 0874be8f9..91fcd9318 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -67,6 +67,11 @@ server { proxy_pass $proxpass; rewrite ^(.+)/+$ $1 permanent; + + # Send actual client IP upstream + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # backend