1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-08-23 16:01:57 +00:00

test: add test for unknown domain responses to acme challenge

This commit is contained in:
Povilas Kanapickas
2025-03-14 01:28:11 +02:00
committed by Nicolas Duchon
parent a1372d2a9b
commit 72210064f0
3 changed files with 21 additions and 0 deletions

View File

@@ -25,3 +25,10 @@ def test_noredirect_acme_challenge_location_enabled(docker_compose, nginxproxy,
allow_redirects=False allow_redirects=False
) )
assert r.status_code == 200 assert r.status_code == 200
def test_unknown_domain_acme_challenge_location_disabled(docker_compose, nginxproxy, acme_challenge_path):
r = nginxproxy.get(
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
allow_redirects=False
)
assert r.status_code == 503

View File

@@ -25,3 +25,10 @@ def test_noredirect_acme_challenge_location_disabled(docker_compose, nginxproxy,
allow_redirects=False allow_redirects=False
) )
assert r.status_code == 404 assert r.status_code == 404
def test_unknown_domain_acme_challenge_location_default_enabled(docker_compose, nginxproxy, acme_challenge_path):
r = nginxproxy.get(
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
allow_redirects=False
)
assert r.status_code == 503

View File

@@ -11,3 +11,10 @@ def test_noredirect_acme_challenge_location_legacy(docker_compose, nginxproxy, a
allow_redirects=False allow_redirects=False
) )
assert r.status_code == 404 assert r.status_code == 404
def test_unknown_domain_acme_challenge_location_legacy(docker_compose, nginxproxy, acme_challenge_path):
r = nginxproxy.get(
f"http://web-unknown.nginx-proxy.tld/{acme_challenge_path}",
allow_redirects=False
)
assert r.status_code == 503