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 aa52f335d..20d70d3b9 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf @@ -5,6 +5,10 @@ if ($scheme = "http") { if ($request_uri = /.well-known/acme-challenge/test-challenge) { set $test "${test}T"; } +# Following ensures that all request to an acme-challenge are not redircted to https +if ($request_uri ~* ^/.well-known/acme-challenge/) { + set $test "${test}C"; +} if ($test = H) { return 301 https://$host$request_uri; }