mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 20:00:12 +00:00
Compare commits
3 Commits
v2.12.3
...
2d65d672c8
Author | SHA1 | Date | |
---|---|---|---|
|
2d65d672c8 | ||
|
2e528348b7 | ||
|
013310ded0 |
@@ -2,9 +2,16 @@ set $test "";
|
||||
if ($scheme = "http") {
|
||||
set $test "H";
|
||||
}
|
||||
if ($request_uri = /.well-known/acme-challenge/test-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;
|
||||
}
|
Reference in New Issue
Block a user