mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-07-01 14:25:46 +00:00
fix: Don't create fallback http(s) server when http(s) disabled
Before, a fallback http server was created to handle requests for unknown virtual hosts even when `HTTPS_METHOD=nohttp`. (In this case, all http vhosts would be unknown.) Likewise, a catch-all fallback https server was still created even if `HTTPS_METHOD=nohttps`. Now the fallback servers are created only if needed. This brings the behavior in line with the documentation and user expectation. It will also make it easier to implement a planned feature: different servers on different ports.
This commit is contained in:
committed by
Nicolas Duchon
parent
9297e94389
commit
9b4bb07b34
16
test/test_fallback.data/nohttp-on-app.yml
Normal file
16
test/test_fallback.data/nohttp-on-app.yml
Normal file
@ -0,0 +1,16 @@
|
||||
services:
|
||||
sut:
|
||||
image: nginxproxy/nginx-proxy:test
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
- ./withdefault.certs:/etc/nginx/certs:ro
|
||||
environment:
|
||||
HTTPS_METHOD: redirect
|
||||
https-only:
|
||||
image: web
|
||||
expose:
|
||||
- "82"
|
||||
environment:
|
||||
WEB_PORTS: "82"
|
||||
HTTPS_METHOD: nohttp
|
||||
VIRTUAL_HOST: https-only.nginx-proxy.test
|
Reference in New Issue
Block a user