Skip to content

Commit

Permalink
Merge pull request #56 from deskpro/remove-extra-parameter-to-proxy-s…
Browse files Browse the repository at this point in the history
…et-header

remove invalid parameter for proxy_set_header
  • Loading branch information
fcoelho authored Aug 9, 2024
2 parents 7a2954b + d82a764 commit 84b045a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions etc/nginx/conf.d/deskpro_server_params.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ location ^~ /sys/services/messenger-api/ {
proxy_set_header Host $host;

{{if getenv "HTTP_USER_REAL_PROTO_HEADER"}}
proxy_set_header X-Forwarded-Proto $http_{{ (getenv "HTTP_USER_REAL_PROTO_HEADER") | toLower | replaceAll "-" "_" }} if_not_empty;
proxy_set_header X-Forwarded-Proto $http_{{ (getenv "HTTP_USER_REAL_PROTO_HEADER") | toLower | replaceAll "-" "_" }};
{{else}}
proxy_set_header X-Forwarded-Proto $proto_for_scheme;
{{end}}

{{if getenv "HTTP_USER_REAL_HOST_HEADER"}}
proxy_set_header X-Forwaded-Host $http_{{ (getenv "HTTP_USER_REAL_HOST_HEADER") | toLower | replaceAll "-" "_" }} if_not_empty;
proxy_set_header X-Forwaded-Host $http_{{ (getenv "HTTP_USER_REAL_HOST_HEADER") | toLower | replaceAll "-" "_" }};
{{else if getenv "HTTP_SERVE_HOST"}}
proxy_set_header X-Forwarded-Host "{{ getenv "HTTP_SERVE_HOST" "$http_host" }}";
{{end}}

{{if getenv "HTTP_USER_REAL_PORT_HEADER"}}
proxy_set_header X-Forwarded-Port $http_{{ (getenv "HTTP_USER_REAL_PORT_HEADER") | toLower | replaceAll "-" "_" }} if_not_empty;
proxy_set_header X-Forwarded-Port $http_{{ (getenv "HTTP_USER_REAL_PORT_HEADER") | toLower | replaceAll "-" "_" }};
{{else}}
proxy_set_header X-Forwarded-Port $port_for_scheme;
{{end}}
Expand Down

0 comments on commit 84b045a

Please sign in to comment.