Skip to content

Commit

Permalink
Update X-Forwarded-Port
Browse files Browse the repository at this point in the history
  • Loading branch information
alexw23 authored Dec 22, 2016
1 parent 3980756 commit 8b8b02e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion controllers/nginx/rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ http {
default $http_x_forwarded_proto;
'' $scheme;
}

map $http_x_forwarded_proto $pass_server_port {
default $http_x_forwarded_port;
'' $server_port;
}

# Map a response error watching the header Content-Type
map $http_accept $httpAccept {
Expand Down Expand Up @@ -197,7 +202,7 @@ http {
{{ end }}

# map port 442 to 443 for header X-Forwarded-Port
map $pass_port $server_port {
map $pass_port $pass_server_port {
442 443;
default 80;
}
Expand Down

0 comments on commit 8b8b02e

Please sign in to comment.