From 1a12f7f3a847f1a66d0bae372b09c03dab49acfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Cap=C3=B3?= Date: Sat, 22 Jun 2024 14:56:52 +0200 Subject: [PATCH] force-ssl behind another proxy using http_x_forwarded_proto --- docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf | 3 +++ 1 file changed, 3 insertions(+) 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 aa52f335..b0acd36a 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf @@ -2,6 +2,9 @@ set $test ""; if ($scheme = "http") { set $test "H"; } +if ($http_x_forwarded_proto = "http") { + set $test "H"; +} if ($request_uri = /.well-known/acme-challenge/test-challenge) { set $test "${test}T"; }