nixos/tests/custom-ca: fix by setting Content-Type
This test was failing because Firefox was displaying a download prompt rather than the page content, presumably because mumble mumble content-type sniffing. By explicitly setting a content-type, the test now passes.
This commit is contained in:
@@ -92,13 +92,19 @@ in
|
|||||||
{ onlySSL = true;
|
{ onlySSL = true;
|
||||||
sslCertificate = "${example-good-cert}/server.crt";
|
sslCertificate = "${example-good-cert}/server.crt";
|
||||||
sslCertificateKey = "${example-good-cert}/server.key";
|
sslCertificateKey = "${example-good-cert}/server.key";
|
||||||
locations."/".extraConfig = "return 200 'It works!';";
|
locations."/".extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200 'It works!';
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."bad.example.com" =
|
services.nginx.virtualHosts."bad.example.com" =
|
||||||
{ onlySSL = true;
|
{ onlySSL = true;
|
||||||
sslCertificate = "${example-bad-cert}/server.crt";
|
sslCertificate = "${example-bad-cert}/server.crt";
|
||||||
sslCertificateKey = "${example-bad-cert}/server.key";
|
sslCertificateKey = "${example-bad-cert}/server.key";
|
||||||
locations."/".extraConfig = "return 200 'It does not work!';";
|
locations."/".extraConfig = ''
|
||||||
|
add_header Content-Type text/plain;
|
||||||
|
return 200 'It does not work!';
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
|
|||||||
Reference in New Issue
Block a user