From eeab425ea4419c038955433f5ce1c2da75d07eda Mon Sep 17 00:00:00 2001 From: jerry-yuan Date: Tue, 10 Feb 2026 10:52:32 +0000 Subject: [PATCH] fix: unknown "trust_forwarded_proto" variable error when run with already created old virtual hosts --- docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf index 24ef18a0..8e58c64a 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf @@ -8,7 +8,10 @@ if ($request_uri = /.well-known/acme-challenge/test-challenge) { # Check if the ssl staff has been handled set $test_ssl_handled ""; -if ($trust_forwarded_proto = T){ +if ($trust_forwarded_proto = "") { + set $trust_forwarded_proto "F"; +} +if ($trust_forwarded_proto = "T") { set $test_ssl_handled "${test_ssl_handled}T"; } if ($http_x_forwarded_proto = "https") {