Updated nginx ssl config to provide correct X-Forwared-Proto header

This commit is contained in:
John 2016-10-15 13:29:13 +02:00 committed by GitHub
parent d9b9d12d08
commit a83cc74087

View File

@ -4,6 +4,11 @@
# return 301 https://$server_name$request_uri;
# }
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
server {
listen 443;
@ -25,7 +30,7 @@ server {
proxy_set_header Host $http_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_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_pass http://app:APP_PORT;
}