Skip to content

Commit

Permalink
use $http_host in nginx proxy header
Browse files Browse the repository at this point in the history
$host is the hostname, $http_host is `hostname[:port]`, which is what's needed here

$host works fine in the example because it uses the default port 80, but if it's on a different port
it will differ from the http Host header, resulting in cross-origin check errors.
  • Loading branch information
minrk committed Jan 11, 2024
1 parent a11816b commit 603c59a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/howto/configuration/config-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ server {
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# websocket headers
Expand Down

0 comments on commit 603c59a

Please sign in to comment.