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 e79dca6b..347df40f 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf @@ -2,16 +2,9 @@ set $test ""; if ($scheme = "http") { set $test "H"; } -if ($request_uri ~ "^\/\.well-known\/acme-challenge\/(.*)" { +if ($request_uri ~ "^\/\.well-known\/acme-challenge\/(.*)") { set $test "${test}T"; } if ($test = H) { return 301 https://$host$request_uri; } -if ($request_uri !~ "^\/\.well-known\/acme-challenge\/(.*)") { - set $FORCE "${FORCE}D"; -} -# If we are http and outside the LetsEncrypt directories redirect to https via 301 -if ($FORCE = HD) { - return 301 https://$host$request_uri; -} \ No newline at end of file