mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Update force-ssl.conf
Revised as per PR discussion.
This commit is contained in:
parent
2d65d672c8
commit
2bb99e68d8
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user