1 import ./make-test-python.nix {
2 name = "nginx-more-headers";
13 "/".return = "200 blub";
17 more_set_headers "Referrer-Policy: no-referrer";
22 more_set_headers "X-Powered-By: nixos";
30 webserver.wait_for_unit("nginx")
31 webserver.wait_for_open_port(80)
33 webserver.succeed("curl --fail --resolve test:80:127.0.0.1 --head --verbose http://test | grep -q \"X-Powered-By: nixos\"")
34 webserver.fail("curl --fail --resolve test:80:127.0.0.1 --head --verbose http://test | grep -q \"Referrer-Policy: no-referrer\"")
36 webserver.succeed("curl --fail --resolve test:80:127.0.0.1 --head --verbose http://test/some | grep -q \"X-Powered-By: nixos\"")
37 webserver.succeed("curl --fail --resolve test:80:127.0.0.1 --head --verbose http://test/some | grep -q \"Referrer-Policy: no-referrer\"")