You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@
5
5
### Changed
6
6
7
7
-**Breaking:**`Strict-Transport-Security` now has a max-age of 365 days, up from 180
8
+
-**Breaking:**`Content-Security-Policy` middleware now throws an error if a directive should have quotes but does not, such as `self` instead of `'self'`. See [#454](https://github.com/helmetjs/helmet/issues/454)
`Content-Security-Policy got directive value \`${value}\` which should be single-quoted and changed to \`'${value}'\`. This will be an error in future versions of Helmet.`,
`Content-Security-Policy got directive value \`${directiveValue}\` which should be single-quoted and changed to \`'${directiveValue}'\`. This will be an error in future versions of Helmet.`,
378
-
);
379
-
}
380
-
});
381
-
382
373
it("errors if any directive values are invalid when a function returns",async()=>{
`Content-Security-Policy got directive value \`${directiveValue}\` which should be single-quoted and changed to \`'${directiveValue}'\`. This will be an error in future versions of Helmet.`,
434
-
);
435
-
}
403
+
awaitsupertest(app).get("/").expect(500,{
404
+
helmetTestError: true,
405
+
message:
406
+
'Content-Security-Policy received an invalid directive value for "default-src"',
0 commit comments