Pass host and x-forwarded-for headers when using nginx reverse proxy

This commit is contained in:
Marko Bocevski 2017-04-07 09:10:07 +02:00
parent db0b33437d
commit 353c88d473
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}
}
}