From 603c59a30753138d63d5af9dcb0f245029e3bb3f Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 11 Jan 2024 09:17:08 +0100 Subject: [PATCH] use $http_host in nginx proxy header $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. --- docs/source/howto/configuration/config-proxy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/howto/configuration/config-proxy.md b/docs/source/howto/configuration/config-proxy.md index 8c4dc373..04efad6f 100644 --- a/docs/source/howto/configuration/config-proxy.md +++ b/docs/source/howto/configuration/config-proxy.md @@ -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