proxy: do not set Host header when proxying
The default when proxying is $proxy_host. Proxied apps must used X-Forwarded-Host header to determine the intended target. I think we overwrote the Host header back in the day because apps had varied support for this. Ideally, it can be removed across all our configurations.
This commit is contained in:
@@ -147,7 +147,9 @@ server {
|
||||
proxy_read_timeout 3500;
|
||||
proxy_connect_timeout 3250;
|
||||
|
||||
<% if ( endpoint !== 'external' ) { %>
|
||||
proxy_set_header Host $host;
|
||||
<% } %>
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
|
||||
Reference in New Issue
Block a user