Skip to content

Commit da1c0e7

Browse files
committed
Correctly set the host headers
This was causing the links in the API responses to be rendered e.g. without the correct port, so later ones in the pagination would fail. See wger-project/flutter#911
1 parent d813b77 commit da1c0e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

config/nginx.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ server {
88

99
location / {
1010
proxy_pass http://wger;
11-
proxy_set_header Host $host;
11+
proxy_set_header Host $http_host;
1212
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
13-
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
14-
proxy_set_header X-Forwarded-Host $host:$server_port;
13+
proxy_set_header X-Forwarded-Proto $scheme;
14+
proxy_set_header X-Forwarded-Host $http_host;
1515
proxy_redirect off;
1616
}
1717

0 commit comments

Comments
 (0)