File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ def test_web1_HSTS_default(docker_compose, nginxproxy):
77 assert "Strict-Transport-Security" in r .headers
88 assert "max-age=31536000" == r .headers ["Strict-Transport-Security" ]
99
10+ # Regression test to ensure HSTS is enabled even when the upstream sends an error in response
11+ # Issue #1073 https://github.com/jwilder/nginx-proxy/pull/1073
12+ def test_web1_HSTS_error (docker_compose , nginxproxy ):
13+ r = nginxproxy .get ("https://web1.nginx-proxy.tld/status/500" , allow_redirects = False )
14+ assert "Strict-Transport-Security" in r .headers
15+ assert "max-age=31536000" == r .headers ["Strict-Transport-Security" ]
16+
1017def test_web2_HSTS_off (docker_compose , nginxproxy ):
1118 r = nginxproxy .get ("https://web2.nginx-proxy.tld/port" , allow_redirects = False )
1219 assert "answer from port 81\n " in r .text
You can’t perform that action at this time.
0 commit comments