File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 1.19.5-8
4+
5+ * Allow passing through ` X-Forwarded-Host ` header if it's set.
6+
37## 1.19.5-7
48
59* Set ` daemon ` to ` off ` .
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ http {
2121 port_in_redirect off;
2222 server_tokens off;
2323
24+ # If we receive X-Forwarded-Host, pass it through; otherwise, pass along the
25+ # host used to connect to this server
26+ map $http_x_forwarded_host $proxy_x_forwarded_host {
27+ default $http_x_forwarded_host;
28+ '' $host;
29+ }
30+
2431 # If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
2532 # scheme used to connect to this server
2633 map $http_x_forwarded_proto $proxy_x_forwarded_proto {
6976 proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
7077 proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
7178 proxy_set_header X-Request-ID $proxy_x_request_id;
72- proxy_set_header X-Forwarded-Host $host ;
79+ proxy_set_header X-Forwarded-Host $proxy_x_forwarded_host ;
7380
7481 include /etc/nginx/app.conf;
7582
You can’t perform that action at this time.
0 commit comments