We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b62b6d commit 3333caaCopy full SHA for 3333caa
test/index.test.ts
@@ -53,6 +53,29 @@ describe("helmet", () => {
53
});
54
55
56
+ it("works with all middlewares disabled", async () => {
57
+ await check(
58
+ helmet({
59
+ contentSecurityPolicy: false,
60
+ dnsPrefetchControl: false,
61
+ expectCt: false,
62
+ frameguard: false,
63
+ hidePoweredBy: false,
64
+ hsts: false,
65
+ ieNoOpen: false,
66
+ noSniff: false,
67
+ originAgentCluster: false,
68
+ permittedCrossDomainPolicies: false,
69
+ referrerPolicy: false,
70
+ xssFilter: false,
71
+ }),
72
+ {
73
+ "content-security-policy": null,
74
+ "x-frame-options": null,
75
+ }
76
+ );
77
+ });
78
+
79
it("errors when `use`d directly", () => {
80
const fakeRequest = {
81
constructor: {
0 commit comments