From cee77a8c572b7bd7abde50822f877910142a3a99 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 11 Sep 2024 08:46:22 +0200 Subject: [PATCH] nginx proxy example: Use $host instead of $http_host Thanks for the suggestion @Glandos https://github.com/CollaboraOnline/online/pull/9902 Signed-off-by: Andras Timar Change-Id: Ief580e958d2b98cbff43c3256b4d8987c2f3c3cf --- etc/nginx/coolwsd.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/nginx/coolwsd.conf b/etc/nginx/coolwsd.conf index 6d0814ea516d..0e60c3f5f01a 100644 --- a/etc/nginx/coolwsd.conf +++ b/etc/nginx/coolwsd.conf @@ -1,19 +1,19 @@ # static files location ^~ /browser { proxy_pass http://localhost:9980; - proxy_set_header Host $http_host; + proxy_set_header Host $host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass http://localhost:9980; - proxy_set_header Host $http_host; + proxy_set_header Host $host; } # Capabilities location ^~ /hosting/capabilities { proxy_pass http://localhost:9980; - proxy_set_header Host $http_host; + proxy_set_header Host $host; } # main websocket @@ -21,7 +21,7 @@ proxy_pass http://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; - proxy_set_header Host $http_host; + proxy_set_header Host $host; proxy_read_timeout 36000s; } @@ -29,7 +29,7 @@ # we accept 'lool' to be backward compatible location ~ ^/(c|l)ool { proxy_pass http://localhost:9980; - proxy_set_header Host $http_host; + proxy_set_header Host $host; } # Admin Console websocket @@ -37,6 +37,6 @@ proxy_pass http://localhost:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; - proxy_set_header Host $http_host; + proxy_set_header Host $host; proxy_read_timeout 36000s; }