2024-05-31 00:10:44 +02:00
|
|
|
def test_redirect_acme_challenge_location_disabled(docker_compose, nginxproxy, acme_challenge_path):
|
|
|
|
r = nginxproxy.get(
|
|
|
|
f"http://web1.nginx-proxy.tld/{acme_challenge_path}",
|
|
|
|
allow_redirects=False
|
|
|
|
)
|
|
|
|
assert r.status_code == 301
|
|
|
|
|
|
|
|
def test_redirect_acme_challenge_location_enabled(docker_compose, nginxproxy, acme_challenge_path):
|
|
|
|
r = nginxproxy.get(
|
|
|
|
f"http://web2.nginx-proxy.tld/{acme_challenge_path}",
|
|
|
|
allow_redirects=False
|
|
|
|
)
|
|
|
|
assert r.status_code == 200
|
|
|
|
|
2024-05-31 17:07:07 +02:00
|
|
|
def test_noredirect_acme_challenge_location_disabled(docker_compose, nginxproxy, acme_challenge_path):
|
2024-05-31 00:10:44 +02:00
|
|
|
r = nginxproxy.get(
|
|
|
|
f"http://web3.nginx-proxy.tld/{acme_challenge_path}",
|
|
|
|
allow_redirects=False
|
|
|
|
)
|
|
|
|
assert r.status_code == 404
|
|
|
|
|
2024-05-31 17:07:07 +02:00
|
|
|
def test_noredirect_acme_challenge_location_enabled(docker_compose, nginxproxy, acme_challenge_path):
|
2024-05-31 00:10:44 +02:00
|
|
|
r = nginxproxy.get(
|
|
|
|
f"http://web4.nginx-proxy.tld/{acme_challenge_path}",
|
|
|
|
allow_redirects=False
|
|
|
|
)
|
|
|
|
assert r.status_code == 200
|