From 45e56e4db96c9b670cd4c14af0f6d5406ca5285d Mon Sep 17 00:00:00 2001 From: Josue-T Date: Thu, 18 May 2017 22:21:34 +0200 Subject: [PATCH] Improve security in Nginx config --- conf/nginx.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 5fad826..a9acf2d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,15 @@ location YNH_WWW_PATH { - include proxy_params; proxy_pass http://127.0.0.1:SERVICE_PORTYNH_WWW_PATH; allow 127.0.0.0/8; location ~ ^YNH_WWW_PATH/(.+\.png)$ { alias /var/lib/monitorix/www/$1; } + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; proxy_connect_timeout 600; proxy_send_timeout 600;