mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-28 10:02:29 +00:00
17 lines
446 B
Plaintext
17 lines
446 B
Plaintext
set $test "";
|
|
if ($scheme = "http") {
|
|
set $test "H";
|
|
}
|
|
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;
|
|
} |