We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf6a32b commit dabeb09Copy full SHA for dabeb09
docker/rootfs/etc/nginx/conf.d/include/force-ssl.conf
@@ -1,3 +1,14 @@
1
+# Since force-ssl.conf has now moved to the server section it overrides the letsencrypt config
2
+# which is inside a ___location section
3
+# Set FORCE variable in first 2 if tests and action in the third
4
+set $FORCE "";
5
if ($scheme = "http") {
- return 301 https://$host$request_uri;
6
+ set $FORCE 'H';
7
+}
8
+if ($request_uri !~ "^/.well-known/acme-challenge/(.*)") {
9
+ set $FORCE "${FORCE}D";
10
11
+# If we are http and outside the letsencrypt directories redirect via 301
12
+if ($FORCE = HD) {
13
+ return 301 https://$host$request_uri;
14
}
0 commit comments