mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-05-28 16:43:30 +00:00
Update force-ssl.conf
This commit is contained in:
parent
9052502a17
commit
df5d7dcaab
@ -1,3 +1,14 @@
|
||||
# Since force-ssl.conf has now moved to the server section it overrides the letsencrypt config
|
||||
# which is inside a location section
|
||||
# Set FORCE variable in first 2 if tests and action in the third
|
||||
set $FORCE "";
|
||||
if ($scheme = "http") {
|
||||
return 301 https://$host$request_uri;
|
||||
set $FORCE 'H';
|
||||
}
|
||||
if ($request_uri !~ "^/.well-known/acme-challenge/(.*)") {
|
||||
set $FORCE "${FORCE}D";
|
||||
}
|
||||
# If we are http and outside the letsencrypt directories redirect via 301
|
||||
if ($FORCE = HD) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user