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

This commit is contained in:
John authored and GitHub committed 2016-10-15 13:26:08 +02:00
1 parent 3cb431a35c
commit d9b9d12d08
1 file changed
+6 -1
+6 -1
View File
@@ -1,3 +1,8 @@
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}
server {
listen 80;
@@ -10,7 +15,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;
}