1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ffsync_ynh.git synced 2024-09-03 18:26:38 +02:00

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.
This commit is contained in:
Josue-T 2017-05-18 22:27:40 +02:00 committed by GitHub
parent e920c57040
commit 87bf39094b

View file

@ -2,7 +2,7 @@ location PATHTOCHANGE {
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; 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-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;