We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa851b6 commit 013310dCopy full SHA for 013310d
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
2
+# the LetsEncrypt config which is inside a location section
3
+# Set FORCE variable in first two if tests pass 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 to https via 301
12
+if ($FORCE = HD) {
13
+ return 301 https://$host$request_uri;
14
0 commit comments