From 353c88d4738a6a5bec26a6050e0e3bae682627b5 Mon Sep 17 00:00:00 2001 From: Marko Bocevski Date: Fri, 7 Apr 2017 09:10:07 +0200 Subject: [PATCH] Pass host and x-forwarded-for headers when using nginx reverse proxy --- rootfs/setup/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rootfs/setup/nginx.conf b/rootfs/setup/nginx.conf index fd2bf23..1811bc4 100644 --- a/rootfs/setup/nginx.conf +++ b/rootfs/setup/nginx.conf @@ -22,7 +22,9 @@ http { location / { auth_basic "Restricted"; auth_basic_user_file /srv/app/.htpasswd; - proxy_pass http://127.0.0.1:4000; + proxy_pass http://127.0.0.1:4000/; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header Host $host; } } }