Skip to content

Commit d8a363b

Browse files
committed
FIX: Set the Host header in the nginx.conf upstream block
Using e.g. `proxy_pass http://discourse` resets the Host header on the upstream request to `discourse`. This would break multisites, so we don't want that; the most effetive way to ensure it's set properly is to `set_header` in the upstream block.
1 parent 0e76758 commit d8a363b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

templates/web.template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ run:
146146
filename: "/etc/nginx/conf.d/discourse.conf"
147147
from: /upstream[^\}]+\}/m
148148
to: "upstream discourse {
149+
set_header Host $http_host;
149150
server 127.0.0.1:3000;
150151
}"
151152

0 commit comments

Comments
 (0)