Updated nginx ssl config to provide correct X-Forwared-Proto header
This commit is contained in:
parent
d9b9d12d08
commit
a83cc74087
@ -4,6 +4,11 @@
|
|||||||
# return 301 https://$server_name$request_uri;
|
# return 301 https://$server_name$request_uri;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
|
||||||
|
default $http_x_forwarded_proto;
|
||||||
|
'' $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443;
|
listen 443;
|
||||||
|
|
||||||
@ -25,7 +30,7 @@ server {
|
|||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
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-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
|
||||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||||
proxy_pass http://app:APP_PORT;
|
proxy_pass http://app:APP_PORT;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user