From 2072890fc586325a123569df705b31eca74f7060 Mon Sep 17 00:00:00 2001 From: Mark <0x6d61726b@gmail.com> Date: Thu, 26 Oct 2023 21:53:04 +0200 Subject: [PATCH 1/2] Fixed nginx X-Forwarded-Proto to match the protocol ("http", "https") --- conf/nginx/webvirtcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index 3ba36ec..f18585b 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -14,7 +14,7 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; - proxy_set_header X-Forwarded-Proto $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Ssl off; proxy_connect_timeout 1800; proxy_read_timeout 1800; From cc867304414b5be9340aa76d7296576a4df4f1b1 Mon Sep 17 00:00:00 2001 From: Mark <0x6d61726b@gmail.com> Date: Thu, 26 Oct 2023 22:43:27 +0200 Subject: [PATCH 2/2] Corrected X-Forwarded-Proto meaning for Gunicorn --- conf/nginx/webvirtcloud.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx/webvirtcloud.conf b/conf/nginx/webvirtcloud.conf index f18585b..16128f3 100644 --- a/conf/nginx/webvirtcloud.conf +++ b/conf/nginx/webvirtcloud.conf @@ -14,7 +14,7 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-for $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; - proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-Ssl off; proxy_connect_timeout 1800; proxy_read_timeout 1800;