1
0
Fork 0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-05-06 07:36:10 +02:00

tests non standard port Host header

This commit is contained in:
Niek 2024-02-13 15:24:37 +01:00 committed by GitHub
parent 887e2e950c
commit cb59c24470
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -5,4 +5,9 @@ import pytest
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
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

@ -11,4 +11,9 @@ def test_web1_http_redirects_to_https(docker_compose, nginxproxy, subdomain):
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
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