1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00
nginx-proxy/test/test_http_port.py

14 lines
534 B
Python
Raw Normal View History

2021-06-15 00:13:06 +02:00
import pytest
@pytest.mark.parametrize("subdomain", ["foo", "bar"])
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
2024-02-13 15:24:37 +01:00
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