1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00

Merge pull request #2393 from SchoNie/tests-nonstandardport-hostheader

tests: non standard port Host header check
This commit is contained in:
Nicolas Duchon 2024-02-13 18:23:14 +01:00 committed by GitHub
commit 5c0c8c93d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -6,3 +6,8 @@ def test_web1_http_custom_port(docker_compose, nginxproxy, subdomain):
r = nginxproxy.get("http://%s.nginx-proxy.tld:8080/port" % subdomain, allow_redirects=False)
assert r.status_code == 200
assert "answer from port 81\n" in r.text
def test_nonstandardport_Host_header(docker_compose, nginxproxy):
r = nginxproxy.get("http://web.nginx-proxy.tld:8080/headers")
assert r.status_code == 200
assert "Host: web.nginx-proxy.tld:8080" in r.text

View File

@ -12,3 +12,8 @@ def test_web1_https_is_forwarded(docker_compose, nginxproxy, subdomain):
r = nginxproxy.get("https://%s.nginx-proxy.tld:8443/port" % subdomain, allow_redirects=False)
assert r.status_code == 200
assert "answer from port 81\n" in r.text
def test_nonstandardport_Host_header(docker_compose, nginxproxy):
r = nginxproxy.get("https://web.nginx-proxy.tld:8443/headers")
assert r.status_code == 200
assert "Host: web.nginx-proxy.tld:8443" in r.text