1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 14:25:46 +00:00

test: tests for HTTP/3

Co-authored-by: Nicolas Duchon <nicolas.duchon@gmail.com>
Co-authored-by: Niek <100143256+SchoNie@users.noreply.github.com>
This commit is contained in:
Nicolas Duchon
2023-12-08 00:46:21 +01:00
parent ae5beca0fe
commit c4cb1c3797
10 changed files with 193 additions and 0 deletions

View File

@ -31,3 +31,11 @@ def test_web4_HSTS_off_noredirect(docker_compose, nginxproxy):
r = nginxproxy.get("https://web4.nginx-proxy.tld/port", allow_redirects=False)
assert "answer from port 81\n" in r.text
assert "Strict-Transport-Security" not in r.headers
def test_http3_vhost_enabled_HSTS_default(docker_compose, nginxproxy):
r = nginxproxy.get("https://http3-vhost-enabled.nginx-proxy.tld/port", allow_redirects=False)
assert "answer from port 81\n" in r.text
assert "Strict-Transport-Security" in r.headers
assert "max-age=31536000" == r.headers["Strict-Transport-Security"]
assert "alt-svc" in r.headers
assert r.headers["alt-svc"] == 'h3=":443"; ma=86400;'

View File

@ -34,6 +34,16 @@ web4:
HSTS: "off"
HTTPS_METHOD: "noredirect"
web5:
image: web
expose:
- "81"
environment:
WEB_PORTS: "81"
VIRTUAL_HOST: http3-vhost-enabled.nginx-proxy.tld
labels:
com.github.nginx-proxy.nginx-proxy.http3.enable: "true"
sut:
image: nginxproxy/nginx-proxy:test
volumes: