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 1
1
# Changelog
2
2
3
+ ## 1.19.5-8
4
+
5
+ * Allow passing through ` X-Forwarded-Host ` header if it's set.
6
+
3
7
## 1.19.5-7
4
8
5
9
* Set ` daemon ` to ` off ` .
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ http {
21
21
port_in_redirect off;
22
22
server_tokens off;
23
23
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
+
24
31
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
25
32
# scheme used to connect to this server
26
33
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
69
76
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
70
77
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
71
78
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 ;
73
80
74
81
include /etc/nginx/app.conf;
75
82
You can’t perform that action at this time.
0 commit comments