From 87bf39094b90df861b5464ad10aaadefceef7273 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Thu, 18 May 2017 22:27:40 +0200 Subject: [PATCH] Improve security in Nginx config After a check of nginx security level (with gixy, see more here : https://forum.yunohost.org/t/gixy-check-nginx-security/2892) I found that it's better to replace `$http_host` by `$host` in this case. --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index ab6e584..b6516bf 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location PATHTOCHANGE { if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } - proxy_set_header Host $http_host; + proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr;