mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-06-30 22:05:46 +00:00
fix: nohttp(s) shouldn't disable fallback server
Say we have two containers: - `app1` with `HTTPS_METHOD=redirect` - `app2` with `HTTPS_METHOD=nohttps` Without this change the fallback answer on an HTTPS request to an unknown server would change depending on whether `app1` is up (503) or not (connection refused). This is not wanted. In case someone doesn't want HTTPS at all, they just have to not bind port 443.
This commit is contained in:
@ -664,7 +664,7 @@ proxy_set_header Proxy "";
|
||||
{{- $http3_enabled = or $http3_enabled $vhost.http3_enabled }}
|
||||
{{- end }}
|
||||
{{- $fallback_http := not $default_http_exists }}
|
||||
{{- $fallback_https := and $https_exists (not $default_https_exists) }}
|
||||
{{- $fallback_https := not $default_https_exists }}
|
||||
{{- /*
|
||||
* If there are no vhosts at all, create fallbacks for both plain http
|
||||
* and https so that clients get something more useful than a connection
|
||||
|
Reference in New Issue
Block a user