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:
@ -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;'
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user