Test missing HSTS header

This commit is contained in:
Jake Howard 2018-01-28 11:52:19 +00:00
parent ac29b7f932
commit b86ce01aa2
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -108,5 +108,13 @@ describe('Server', function () {
done();
});
});
it('Should not have HSTS header if HTTP is allowed', function (done) {
runServer({...SERVER_SETTINGS, allowHttp: true}, '/index.html', function (response : any) {
expect(response.status).to.equal(200);
expect(response.headers.get('strict-transport-security')).to.be.null;
done();
});
});
});
});