helmet-core 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,992 @@
1
+ # Changelog
2
+
3
+ ## 8.3.0 - 2026-07-11
4
+
5
+ ### Changed
6
+
7
+ - `Content-Security-Policy`: improved performance by ~7% when there are no dynamic directives
8
+ - `Content-Security-Policy`: improved error handling for invalid directive names
9
+
10
+ ### Fixed
11
+
12
+ - `Content-Security-Policy`: `useDefaults: false` with no directives is no longer valid, both at runtime and the type level
13
+ - `Content-Security-Policy`: dynamically-computed directive values would `throw`, not call `next`, when invalid
14
+ - `Content-Security-Policy`: dynamically-computed directive value entries would `throw`, not call `next`, when function threw
15
+
16
+ ## 8.2.0 - 2026-05-21
17
+
18
+ - `Cross-Origin-Opener-Policy`: support `noopener-allow-popups`. See [#522](https://github.com/helmetjs/helmet/pull/522)
19
+ - Improve error message when passing duplicate options
20
+
21
+ ## 8.1.0 - 2025-03-17
22
+
23
+ ### Changed
24
+
25
+ - `Content-Security-Policy` gives a better error when a directive value, like `self`, should be quoted. See [#482](https://github.com/helmetjs/helmet/issues/482)
26
+
27
+ ## 8.0.0 - 2024-09-28
28
+
29
+ ### Changed
30
+
31
+ - **Breaking:** `Strict-Transport-Security` now has a max-age of 365 days, up from 180
32
+ - **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)
33
+ - **Breaking:** `Content-Security-Policy`'s `getDefaultDirectives` now returns a deep copy. This only affects users who were mutating the result
34
+ - **Breaking:** `Strict-Transport-Security` now throws an error when "includeSubDomains" option is misspelled. This was previously a warning
35
+
36
+ ### Removed
37
+
38
+ - **Breaking:** Drop support for Node 16 and 17. Node 18+ is now required
39
+
40
+ ## 7.2.0 - 2024-09-28
41
+
42
+ ### Changed
43
+
44
+ - `Content-Security-Policy` middleware now warns if a directive should have quotes but does not, such as `self` instead of `'self'`. This will be an error in future versions. See [#454](https://github.com/helmetjs/helmet/issues/454)
45
+
46
+ ## 7.1.0 - 2023-11-07
47
+
48
+ ### Added
49
+
50
+ - `helmet.crossOriginEmbedderPolicy` now supports the `unsafe-none` directive. See [#447](https://github.com/helmetjs/helmet/pull/447)
51
+
52
+ ## 7.0.0 - 2023-05-06
53
+
54
+ ### Changed
55
+
56
+ - **Breaking:** `Cross-Origin-Embedder-Policy` middleware is now disabled by default. See [#411](https://github.com/helmetjs/helmet/issues/411)
57
+
58
+ ### Removed
59
+
60
+ - **Breaking:** Drop support for Node 14 and 15. Node 16+ is now required
61
+ - **Breaking:** `Expect-CT` is no longer part of Helmet. If you still need it, you can use the [`expect-ct` package](https://www.npmjs.com/package/expect-ct). See [#378](https://github.com/helmetjs/helmet/issues/378)
62
+
63
+ ## 6.2.0 - 2023-05-06
64
+
65
+ - Expose header names (e.g., `strictTransportSecurity` for the `Strict-Transport-Security` header, instead of `hsts`)
66
+ - Rework documentation
67
+
68
+ ## 6.1.5 - 2023-04-11
69
+
70
+ ### Fixed
71
+
72
+ - Fixed yet another issue with TypeScript exports. See [#420](https://github.com/helmetjs/helmet/pull/420)
73
+
74
+ ## 6.1.4 - 2023-04-10
75
+
76
+ ### Fixed
77
+
78
+ - Fix another issue with TypeScript default exports. See [#418](https://github.com/helmetjs/helmet/pull/418)
79
+
80
+ ## 6.1.3 - 2023-04-10
81
+
82
+ ### Fixed
83
+
84
+ - Fix issue with TypeScript default exports. See [#417](https://github.com/helmetjs/helmet/pull/417)
85
+
86
+ ## 6.1.2 - 2023-04-09
87
+
88
+ ### Fixed
89
+
90
+ - Restored `main` to package to help with some build tools
91
+
92
+ ## 6.1.1 - 2023-04-08
93
+
94
+ ### Fixed
95
+
96
+ - Fixed missing package metadata
97
+
98
+ ## 6.1.0 - 2023-04-08
99
+
100
+ ### Changed
101
+
102
+ - Improve support for various TypeScript setups, including "nodenext". See [#405](https://github.com/helmetjs/helmet/pull/405)
103
+
104
+ ## 6.0.1 - 2022-11-29
105
+
106
+ ### Fixed
107
+
108
+ - `crossOriginEmbedderPolicy` did not accept options at the top level. See [#390](https://github.com/helmetjs/helmet/issues/390)
109
+
110
+ ## 6.0.0 - 2022-08-26
111
+
112
+ ### Changed
113
+
114
+ - **Breaking:** `helmet.contentSecurityPolicy` no longer sets `block-all-mixed-content` directive by default
115
+ - **Breaking:** `helmet.expectCt` is no longer set by default. It can, however, be explicitly enabled. It will be removed in Helmet 7. See [#310](https://github.com/helmetjs/helmet/issues/310)
116
+ - **Breaking:** Increase TypeScript strictness around some arguments. Only affects TypeScript users, and may not require any code changes. See [#369](https://github.com/helmetjs/helmet/issues/369)
117
+ - `helmet.frameguard` no longer offers a specific error when trying to use `ALLOW-FROM`; it just says that it is unsupported. Only the error message has changed
118
+
119
+ ### Removed
120
+
121
+ - **Breaking:** Dropped support for Node 12 and 13. Node 14+ is now required
122
+
123
+ ## 5.1.1 - 2022-07-23
124
+
125
+ ### Changed
126
+
127
+ - Fix TypeScript bug with some TypeScript configurations. See [#375](https://github.com/helmetjs/helmet/pull/375) and [#359](https://github.com/helmetjs/helmet/issues/359)
128
+
129
+ ## 5.1.0 - 2022-05-17
130
+
131
+ ### Added
132
+
133
+ - `Cross-Origin-Embedder-Policy`: support `credentialless` policy. See [#365](https://github.com/helmetjs/helmet/pull/365)
134
+ - Documented how to set both `Content-Security-Policy` and `Content-Security-Policy-Report-Only`
135
+
136
+ ### Changed
137
+
138
+ - Cleaned up some documentation around `Origin-Agent-Cluster`
139
+
140
+ ## 5.0.2 - 2022-01-22
141
+
142
+ ### Changed
143
+
144
+ - Improve imports for CommonJS and ECMAScript modules. See [#345](https://github.com/helmetjs/helmet/pull/345)
145
+ - Fixed some documentation
146
+
147
+ ## 5.0.1 - 2022-01-03
148
+
149
+ ### Changed
150
+
151
+ - Fixed some documentation
152
+
153
+ ### Removed
154
+
155
+ - Removed some unused internal code
156
+
157
+ ## 5.0.0 - 2022-01-02
158
+
159
+ ### Added
160
+
161
+ - ECMAScript module imports (i.e., `import helmet from "helmet"` and `import { frameguard } from "helmet"`). See [#320](https://github.com/helmetjs/helmet/issues/320)
162
+
163
+ ### Changed
164
+
165
+ - **Breaking:** `helmet.contentSecurityPolicy`: `useDefaults` option now defaults to `true`
166
+ - **Breaking:** `helmet.contentSecurityPolicy`: `form-action` directive is now set to `'self'` by default
167
+ - **Breaking:** `helmet.crossOriginEmbedderPolicy` is enabled by default
168
+ - **Breaking:** `helmet.crossOriginOpenerPolicy` is enabled by default
169
+ - **Breaking:** `helmet.crossOriginResourcePolicy` is enabled by default
170
+ - **Breaking:** `helmet.originAgentCluster` is enabled by default
171
+ - `helmet.frameguard`: add TypeScript editor autocomplete. See [#322](https://github.com/helmetjs/helmet/pull/322)
172
+ - Top-level `helmet()` function is slightly faster
173
+
174
+ ### Removed
175
+
176
+ - **Breaking:** Drop support for Node 10 and 11. Node 12+ is now required
177
+
178
+ ## 4.6.0 - 2021-05-01
179
+
180
+ ### Added
181
+
182
+ - `helmet.contentSecurityPolicy`: the `useDefaults` option, defaulting to `false`, lets you selectively override defaults more easily
183
+ - Explicitly define TypeScript types in `package.json`. See [#303](https://github.com/helmetjs/helmet/pull/303)
184
+
185
+ ## 4.5.0 - 2021-04-17
186
+
187
+ ### Added
188
+
189
+ - `helmet.crossOriginEmbedderPolicy`: a new middleware for the `Cross-Origin-Embedder-Policy` header, disabled by default
190
+ - `helmet.crossOriginOpenerPolicy`: a new middleware for the `Cross-Origin-Opener-Policy` header, disabled by default
191
+ - `helmet.crossOriginResourcePolicy`: a new middleware for the `Cross-Origin-Resource-Policy` header, disabled by default
192
+
193
+ ### Changed
194
+
195
+ - `true` enables a middleware with default options. Previously, this would fail with an error if the middleware was already enabled by default.
196
+ - Log a warning when passing options to `originAgentCluster` at the top level
197
+
198
+ ### Fixed
199
+
200
+ - Incorrect documentation
201
+
202
+ ## 4.4.1 - 2021-01-18
203
+
204
+ ### Changed
205
+
206
+ - Shrink the published package by about 2.5 kB
207
+
208
+ ## 4.4.0 - 2021-01-17
209
+
210
+ ### Added
211
+
212
+ - `helmet.originAgentCluster`: a new middleware for the `Origin-Agent-Cluster` header, disabled by default
213
+
214
+ ## 4.3.1 - 2020-12-27
215
+
216
+ ### Fixed
217
+
218
+ - `helmet.contentSecurityPolicy`: broken TypeScript types. See [#283](https://github.com/helmetjs/helmet/issues/283)
219
+
220
+ ## 4.3.0 - 2020-12-27
221
+
222
+ ### Added
223
+
224
+ - `helmet.contentSecurityPolicy`: setting the `default-src` to `helmet.contentSecurityPolicy.dangerouslyDisableDefaultSrc` disables it
225
+
226
+ ### Changed
227
+
228
+ - `helmet.frameguard`: slightly improved error messages for non-strings
229
+
230
+ ## 4.2.0 - 2020-11-01
231
+
232
+ ### Added
233
+
234
+ - `helmet.contentSecurityPolicy`: get the default directives with `contentSecurityPolicy.getDefaultDirectives()`
235
+
236
+ ### Changed
237
+
238
+ - `helmet()` now supports objects that don't have `Object.prototype` in their chain, such as `Object.create(null)`, as options
239
+ - `helmet.expectCt`: `max-age` is now first. See [#264](https://github.com/helmetjs/helmet/pull/264)
240
+
241
+ ## 4.1.1 - 2020-09-10
242
+
243
+ ### Changed
244
+
245
+ - Fixed a few errors in the README
246
+
247
+ ## 4.1.0 - 2020-08-15
248
+
249
+ ### Added
250
+
251
+ - `helmet.contentSecurityPolicy`:
252
+ - Directive values can now include functions, as they could in Helmet 3. See [#243](https://github.com/helmetjs/helmet/issues/243)
253
+
254
+ ### Changed
255
+
256
+ - Helmet should now play more nicely with TypeScript
257
+
258
+ ### Removed
259
+
260
+ - The `HelmetOptions` interface is no longer exported. This only affects TypeScript users. If you need the functionality back, see [this comment](https://github.com/helmetjs/helmet/issues/235#issuecomment-674016883)
261
+
262
+ ## 4.0.0 - 2020-08-02
263
+
264
+ See the [Helmet 4 upgrade guide](https://github.com/helmetjs/helmet/wiki/Helmet-4-upgrade-guide) for help upgrading from Helmet 3.
265
+
266
+ ### Added
267
+
268
+ - `helmet.contentSecurityPolicy`:
269
+ - If no `default-src` directive is supplied, an error is thrown
270
+ - Directive lists can be any iterable, not just arrays
271
+
272
+ ### Changed
273
+
274
+ - This package no longer has dependencies. This should have no effect on end users, other than speeding up installation time.
275
+ - `helmet.contentSecurityPolicy`:
276
+ - There is now a default set of directives if none are supplied
277
+ - Duplicate keys now throw an error. See [helmetjs/csp#73](https://github.com/helmetjs/csp/issues/73)
278
+ - This middleware is more lenient, allowing more directive names or values
279
+ - `helmet.xssFilter` now disables the buggy XSS filter by default. See [#230](https://github.com/helmetjs/helmet/issues/230)
280
+
281
+ ### Removed
282
+
283
+ - Dropped support for old Node versions. Node 10+ is now required
284
+ - `helmet.featurePolicy`. If you still need it, use the `feature-policy` package on npm.
285
+ - `helmet.hpkp`. If you still need it, use the `hpkp` package on npm.
286
+ - `helmet.noCache`. If you still need it, use the `nocache` package on npm.
287
+ - `helmet.contentSecurityPolicy`:
288
+ - Removed browser sniffing (including the `browserSniff` and `disableAndroid` parameters). See [helmetjs/csp#97](https://github.com/helmetjs/csp/issues/97)
289
+ - Removed conditional support. This includes directive functions and support for a function as the `reportOnly`. [Read this if you need help.](https://github.com/helmetjs/helmet/wiki/Conditionally-using-middleware)
290
+ - Removed a lot of checks—you should be checking your CSP with a different tool
291
+ - Removed support for legacy headers (and therefore the `setAllHeaders` parameter). [Read this if you need help.](https://github.com/helmetjs/helmet/wiki/Setting-legacy-Content-Security-Policy-headers-in-Helmet-4)
292
+ - Removed the `loose` option
293
+ - Removed support for functions as directive values. You must supply an iterable of strings
294
+ - `helmet.frameguard`:
295
+ - Dropped support for the `ALLOW-FROM` action. [Read more here.](https://github.com/helmetjs/helmet/wiki/How-to-use-X%E2%80%93Frame%E2%80%93Options's-%60ALLOW%E2%80%93FROM%60-directive)
296
+ - `helmet.hidePoweredBy` no longer accepts arguments. See [this article](https://github.com/helmetjs/helmet/wiki/How-to-set-a-custom-X%E2%80%93Powered%E2%80%93By-header) to see how to replicate the removed behavior. See [#224](https://github.com/helmetjs/helmet/issues/224).
297
+ - `helmet.hsts`:
298
+ - Dropped support for `includeSubdomains` with a lowercase D. See [#231](https://github.com/helmetjs/helmet/issues/231)
299
+ - Dropped support for `setIf`. [Read this if you need help.](https://github.com/helmetjs/helmet/wiki/Conditionally-using-middleware) See [#232](https://github.com/helmetjs/helmet/issues/232)
300
+ - `helmet.xssFilter` no longer accepts options. Read ["How to disable blocking with X-XSS-Protection"](https://github.com/helmetjs/helmet/wiki/How-to-disable-blocking-with-X%E2%80%93XSS%E2%80%93Protection) and ["How to enable the `report` directive with X-XSS-Protection"](https://github.com/helmetjs/helmet/wiki/How-to-enable-the-%60report%60-directive-with-X%E2%80%93XSS%E2%80%93Protection) if you need the legacy behavior.
301
+
302
+ ## 3.23.3 - 2020-06-26
303
+
304
+ ### Changed
305
+
306
+ - `helmet.expectCt` is no longer a separate package. This should have no effect on end users.
307
+ - `helmet.frameguard` is no longer a separate package. This should have no effect on end users.
308
+
309
+ ## 3.23.2 - 2020-06-23
310
+
311
+ ### Changed
312
+
313
+ - `helmet.dnsPrefetchControl` is no longer a separate package. This should have no effect on end users.
314
+
315
+ ## 3.23.1 - 2020-06-16
316
+
317
+ ### Changed
318
+
319
+ - `helmet.ieNoOpen` is no longer a separate package. This should have no effect on end users.
320
+
321
+ ## 3.23.0 - 2020-06-12
322
+
323
+ ### Deprecated
324
+
325
+ - `helmet.featurePolicy` is deprecated. Use the `feature-policy` module instead.
326
+
327
+ ## 3.22.1 - 2020-06-10
328
+
329
+ ### Changed
330
+
331
+ - Rewrote internals in TypeScript. This should have no effect on end users.
332
+
333
+ ## 3.22.0 - 2020-03-24
334
+
335
+ ### Changed
336
+
337
+ - Updated `helmet-csp` to v2.10.0
338
+ - Add support for the `allow-downloads` sandbox directive. See [helmet-csp#103](https://github.com/helmetjs/csp/pull/103)
339
+
340
+ ### Deprecated
341
+
342
+ - `helmet.noCache` is deprecated. Use the `nocache` module instead. See [#215](https://github.com/helmetjs/helmet/issues/215)
343
+
344
+ ## 3.21.3 - 2020-02-24
345
+
346
+ ### Changed
347
+
348
+ - Updated `helmet-csp` to v2.9.5
349
+ - Updated `bowser` subdependency from 2.7.0 to 2.9.0
350
+ - Fixed an issue some people were having when importing the `bowser` subdependency. See [helmet-csp#96](https://github.com/helmetjs/csp/issues/96) and [#101](https://github.com/helmetjs/csp/pull/101)
351
+
352
+ ## 3.21.2 - 2019-10-21
353
+
354
+ ### Changed
355
+
356
+ - Updated `helmet-csp` to v2.9.4
357
+ - Updated `bowser` subdependency from 2.6.1 to 2.7.0. See [helmet-csp#94](https://github.com/helmetjs/csp/pull/94)
358
+
359
+ ## 3.21.1 - 2019-09-20
360
+
361
+ ### Fixed
362
+
363
+ - Updated `helmet-csp` to v2.9.2
364
+ - Fixed a bug where a request from Firefox 4 could delete `default-src` from future responses
365
+ - Fixed tablet PC detection by updating `bowser` subdependency to latest version
366
+
367
+ ## 3.21.0 - 2019-09-04
368
+
369
+ ### Added
370
+
371
+ - Updated `x-xss-protection` to v1.3.0
372
+ - Added `mode: null` to disable `mode=block`
373
+
374
+ ### Changed
375
+
376
+ - Updated `helmet-csp` to v2.9.1
377
+ - Updated `bowser` subdependency from 2.5.3 to 2.5.4. See [helmet-csp#88](https://github.com/helmetjs/csp/pull/88)
378
+
379
+ ## 3.20.1 - 2019-08-28
380
+
381
+ ### Changed
382
+
383
+ - Updated `helmet-csp` to v2.9.0
384
+
385
+ ## 3.20.0 - 2019-07-24
386
+
387
+ ### Changed
388
+
389
+ - Updated `helmet-csp` to v2.8.0
390
+
391
+ ## 3.19.0 - 2019-07-17
392
+
393
+ ### Changed
394
+
395
+ - Updated `dns-prefetch-control` to v0.2.0
396
+ - Updated `dont-sniff-mimetype` to v1.1.0
397
+ - Updated `helmet-crossdomain` to v0.4.0
398
+ - Updated `hide-powered-by` to v1.1.0
399
+ - Updated `x-xss-protection` to v1.2.0
400
+
401
+ ## 3.18.0 - 2019-05-05
402
+
403
+ ### Added
404
+
405
+ - `featurePolicy` has 19 new features: `ambientLightSensor`, `documentDomain`, `documentWrite`, `encryptedMedia`, `fontDisplayLateSwap`, `layoutAnimations`, `legacyImageFormats`, `loadingFrameDefaultEager`, `oversizedImages`, `pictureInPicture`, `serial`, `syncScript`, `unoptimizedImages`, `unoptimizedLosslessImages`, `unoptimizedLossyImages`, `unsizedMedia`, `verticalScroll`, `wakeLock`, and `xr`
406
+
407
+ ### Changed
408
+
409
+ - Updated `expect-ct` to v0.2.0
410
+ - Updated `feature-policy` to v0.3.0
411
+ - Updated `frameguard` to v3.1.0
412
+ - Updated `nocache` to v2.1.0
413
+
414
+ ## 3.17.0 - 2019-05-03
415
+
416
+ ### Added
417
+
418
+ - `referrerPolicy` now supports multiple values
419
+
420
+ ### Changed
421
+
422
+ - Updated `referrerPolicy` to v1.2.0
423
+
424
+ ## 3.16.0 - 2019-03-10
425
+
426
+ ### Added
427
+
428
+ - Add email to `bugs` field in `package.json`
429
+
430
+ ### Changed
431
+
432
+ - Updated `hsts` to v2.2.0
433
+ - Updated `ienoopen` to v1.1.0
434
+ - Changelog is now in the [Keep A Changelog](https://keepachangelog.com/) format
435
+ - Dropped support for Node <4. See [the commit](https://github.com/helmetjs/helmet/commit/a49cec3ca58cce484d2d05e1f908549caa92ed03) for more information
436
+ - Updated Adam Baldwin's contact information
437
+
438
+ ### Deprecated
439
+
440
+ - `helmet.hsts`'s `setIf` option has been deprecated and will be removed in `hsts@3`. See [helmetjs/hsts#22](https://github.com/helmetjs/hsts/issues/22) for more
441
+
442
+ * The `includeSubdomains` option (with a lowercase `d`) has been deprecated and will be removed in `hsts@3`. Use the uppercase-D `includeSubDomains` option instead. See [helmetjs/hsts#21](https://github.com/helmetjs/hsts/issues/21) for more
443
+
444
+ ## 3.15.1 - 2019-02-10
445
+
446
+ ### Deprecated
447
+
448
+ - The `hpkp` middleware has been deprecated. If you still need to use this module, install the standalone `hpkp` module from npm. See [#180](https://github.com/helmetjs/helmet/issues/180) for more.
449
+
450
+ ## 3.15.0 - 2018-11-07
451
+
452
+ ### Added
453
+
454
+ - `helmet.featurePolicy` now supports four new features
455
+
456
+ ## 3.14.0 - 2018-10-09
457
+
458
+ ### Added
459
+
460
+ - `helmet.featurePolicy` middleware
461
+
462
+ ## 3.13.0 - 2018-07-22
463
+
464
+ ### Added
465
+
466
+ - `helmet.permittedCrossDomainPolicies` middleware
467
+
468
+ ## 3.12.2 - 2018-07-20
469
+
470
+ ### Fixed
471
+
472
+ - Removed `lodash.reduce` dependency from `csp`
473
+
474
+ ## 3.12.1 - 2018-05-16
475
+
476
+ ### Fixed
477
+
478
+ - `expectCt` should use comma instead of semicolon as delimiter
479
+
480
+ ## 3.12.0 - 2018-03-02
481
+
482
+ ### Added
483
+
484
+ - `xssFilter` now supports `reportUri` option
485
+
486
+ ## 3.11.0 - 2018-02-09
487
+
488
+ ### Added
489
+
490
+ - Main Helmet middleware is now named to help with debugging
491
+
492
+ ## 3.10.0 - 2018-01-23
493
+
494
+ ### Added
495
+
496
+ - `csp` now supports `prefix-src` directive
497
+
498
+ ### Fixed
499
+
500
+ - `csp` no longer loads JSON files internally, helping some module bundlers
501
+ - `false` should be able to disable a CSP directive
502
+
503
+ ## 3.9.0 - 2017-10-13
504
+
505
+ ### Added
506
+
507
+ - `csp` now supports `strict-dynamic` value
508
+ - `csp` now supports `require-sri-for` directive
509
+
510
+ ### Changed
511
+
512
+ - Removed `connect` dependency
513
+
514
+ ## 3.8.2 - 2017-09-27
515
+
516
+ ### Changed
517
+
518
+ - Updated `connect` dependency to latest
519
+
520
+ ## 3.8.1 - 2017-07-28
521
+
522
+ ### Fixed
523
+
524
+ - `csp` does not automatically set `report-to` when setting `report-uri`
525
+
526
+ ## 3.8.0 - 2017-07-21
527
+
528
+ ### Changed
529
+
530
+ - `hsts` no longer cares whether it's HTTPS and always sets the header
531
+
532
+ ## 3.7.0 - 2017-07-21
533
+
534
+ ### Added
535
+
536
+ - `csp` now supports `report-to` directive
537
+
538
+ ### Changed
539
+
540
+ - Throw an error when used incorrectly
541
+ - Add a few documentation files to `npmignore`
542
+
543
+ ## 3.6.1 - 2017-05-21
544
+
545
+ ### Changed
546
+
547
+ - Bump `connect` version
548
+
549
+ ## 3.6.0 - 2017-05-04
550
+
551
+ ### Added
552
+
553
+ - `expectCt` middleware for setting the `Expect-CT` header
554
+
555
+ ## 3.5.0 - 2017-03-06
556
+
557
+ ### Added
558
+
559
+ - `csp` now supports the `worker-src` directive
560
+
561
+ ## 3.4.1 - 2017-02-24
562
+
563
+ ### Changed
564
+
565
+ - Bump `connect` version
566
+
567
+ ## 3.4.0 - 2017-01-13
568
+
569
+ ### Added
570
+
571
+ - `csp` now supports more `sandbox` directives
572
+
573
+ ## 3.3.0 - 2016-12-31
574
+
575
+ ### Added
576
+
577
+ - `referrerPolicy` allows `strict-origin` and `strict-origin-when-cross-origin` directives
578
+
579
+ ### Changed
580
+
581
+ - Bump `connect` version
582
+
583
+ ## 3.2.0 - 2016-12-22
584
+
585
+ ### Added
586
+
587
+ - `csp` now allows `manifest-src` directive
588
+
589
+ ## 3.1.0 - 2016-11-03
590
+
591
+ ### Added
592
+
593
+ - `csp` now allows `frame-src` directive
594
+
595
+ ## 3.0.0 - 2016-10-28
596
+
597
+ ### Changed
598
+
599
+ - `csp` will check your directives for common mistakes and throw errors if it finds them. This can be disabled with `loose: true`.
600
+ - Empty arrays are no longer allowed in `csp`. For source lists (like `script-src` or `object-src`), use the standard `scriptSrc: ["'none'"]`. The `sandbox` directive can be `sandbox: true` to block everything.
601
+ - `false` can disable a CSP directive. For example, `scriptSrc: false` is the same as not specifying it.
602
+ - In CSP, `reportOnly: true` no longer requires a `report-uri` to be set.
603
+ - `hsts`'s `maxAge` now defaults to 180 days (instead of 1 day)
604
+ - `hsts`'s `maxAge` parameter is seconds, not milliseconds
605
+ - `hsts` includes subdomains by default
606
+ - `domain` parameter in `frameguard` cannot be empty
607
+
608
+ ### Removed
609
+
610
+ - `noEtag` option no longer present in `noCache`
611
+ - iOS Chrome `connect-src` workaround in CSP module
612
+
613
+ ## 2.3.0 - 2016-09-30
614
+
615
+ ### Added
616
+
617
+ - `hpkp` middleware now supports the `includeSubDomains` property with a capital D
618
+
619
+ ### Fixed
620
+
621
+ - `hpkp` was setting `includeSubdomains` instead of `includeSubDomains`
622
+
623
+ ## 2.2.0 - 2016-09-16
624
+
625
+ ### Added
626
+
627
+ - `referrerPolicy` middleware
628
+
629
+ ## 2.1.3 - 2016-09-07
630
+
631
+ ### Changed
632
+
633
+ - Top-level aliases (like `helmet.xssFilter`) are no longer dynamically required
634
+
635
+ ## 2.1.2 - 2016-07-27
636
+
637
+ ### Deprecated
638
+
639
+ - `nocache`'s `noEtag` option is now deprecated
640
+
641
+ ### Fixed
642
+
643
+ - `csp` now better handles Firefox on mobile
644
+
645
+ ## 2.1.1 - 2016-06-10
646
+
647
+ ### Changed
648
+
649
+ - Remove several dependencies from `helmet-csp`
650
+
651
+ ### Fixed
652
+
653
+ - `frameguard` had a documentation error about its default value
654
+ - `frameguard` docs in main Helmet readme said `frameguard`, not `helmet.frameguard`
655
+
656
+ ## 2.1.0 - 2016-05-18
657
+
658
+ ### Added
659
+
660
+ - `csp` lets you dynamically set `reportOnly`
661
+
662
+ ## 2.0.0 - 2016-04-29
663
+
664
+ ### Added
665
+
666
+ - Pass configuration to enable/disable default middlewares
667
+
668
+ ### Changed
669
+
670
+ - `dnsPrefetchControl` middleware is now enabled by default
671
+
672
+ ### Removed
673
+
674
+ - No more module aliases. There is now just one way to include each middleware
675
+ - `frameguard` can no longer be initialized with strings; you must use an object
676
+
677
+ ### Fixed
678
+
679
+ - Make `hpkp` lowercase in documentation
680
+ - Update `hpkp` spec URL in readmes
681
+ - Update `frameguard` header name in readme
682
+
683
+ ## 1.3.0 - 2016-03-01
684
+
685
+ ### Added
686
+
687
+ - `hpkp` has a `setIf` option to conditionally set the header
688
+
689
+ ## 1.2.0 - 2016-02-29
690
+
691
+ ### Added
692
+
693
+ - `csp` now has a `browserSniff` option to disable all user-agent sniffing
694
+
695
+ ### Changed
696
+
697
+ - `frameguard` can now be initialized with options
698
+ - Add `npmignore` file to speed up installs slightly
699
+
700
+ ## 1.1.0 - 2016-01-12
701
+
702
+ ### Added
703
+
704
+ - Code of conduct
705
+ - `dnsPrefetchControl` middleware
706
+
707
+ ### Fixed
708
+
709
+ - `csp` readme had syntax errors
710
+
711
+ ## 1.0.2 - 2016-01-08
712
+
713
+ ### Fixed
714
+
715
+ - `csp` wouldn't recognize `IE Mobile` browsers
716
+ - `csp` had some errors in its readme
717
+ - Main readme had a syntax error
718
+
719
+ ## 1.0.1 - 2015-12-19
720
+
721
+ ### Fixed
722
+
723
+ - `csp` with no User Agent would cause errors
724
+
725
+ ## 1.0.0 - 2015-12-18
726
+
727
+ ### Added
728
+
729
+ - `csp` module supports dynamically-generated values
730
+
731
+ ### Changed
732
+
733
+ - `csp` directives are now under the `directives` key
734
+ - `hpkp`'s `Report-Only` header is now opt-in, not opt-out
735
+ - Tweak readmes of every sub-repo
736
+
737
+ ### Removed
738
+
739
+ - `crossdomain` middleware
740
+ - `csp` no longer throws errors when some directives aren't quoted (`'self'`, for example)
741
+ - `maxage` option in the `hpkp` middleware
742
+ - `safari5` option from `csp` module
743
+
744
+ ### Fixed
745
+
746
+ - Old Firefox Content-Security-Policy behavior for `unsafe-inline` and `unsafe-eval`
747
+ - Dynamic `csp` policies is no longer recursive
748
+
749
+ ## 0.15.0 - 2015-11-26
750
+
751
+ ### Changed
752
+
753
+ - `hpkp` allows a `report-uri` without the `Report-Only` header
754
+
755
+ ## 0.14.0 - 2015-11-01
756
+
757
+ ### Added
758
+
759
+ - `nocache` now sends the `Surrogate-Control` header
760
+
761
+ ### Changed
762
+
763
+ - `nocache` no longer contains the `private` directive in the `Cache-Control` header
764
+
765
+ ## 0.13.0 - 2015-10-23
766
+
767
+ ### Added
768
+
769
+ - `xssFilter` now has a function name
770
+ - Added new CSP docs to readme
771
+
772
+ ### Changed
773
+
774
+ - HSTS option renamed from `includeSubdomains` to `includeSubDomains`
775
+
776
+ ## 0.11.0 - 2015-09-18
777
+
778
+ ### Added
779
+
780
+ - `csp` now supports Microsoft Edge
781
+ - CSP Level 2 support
782
+
783
+ ### Changed
784
+
785
+ - Updated `connect` to 3.4.0
786
+ - Updated `depd` to 1.1.0
787
+
788
+ ### Fixed
789
+
790
+ - Added `license` key to `csp`'s `package.json`
791
+ - Empty `csp` directives now support every directive, not just `sandbox`
792
+
793
+ ## 0.10.0 - 2015-07-08
794
+
795
+ ### Added
796
+
797
+ - Add "Handling CSP violations" to `csp` readme
798
+ - Add license to `package.json`
799
+
800
+ ### Changed
801
+
802
+ - `hpkp` had a link to the wrong place in its readme
803
+ - `hpkp` requires 2 or more pins
804
+
805
+ ### Fixed
806
+
807
+ - `hpkp` might have miscalculated `maxAge` slightly wrong
808
+
809
+ ## 0.9.0 - 2015-04-24
810
+
811
+ ### Changed
812
+
813
+ - `nocache` adds `private` to its `Cache-Control` directive
814
+ - Added a description to `package.json`
815
+
816
+ ## 0.8.0 - 2015-04-21
817
+
818
+ ### Changed
819
+
820
+ - Removed hefty Lodash dependency from HSTS and CSP
821
+ - Updated string detection module in Frameguard
822
+ - Changed readme slightly to better reflect project's focus
823
+
824
+ ### Deprecated
825
+
826
+ - Deprecated `crossdomain` middleware
827
+
828
+ ### Removed
829
+
830
+ - `crossdomain` is no longer a default middleware
831
+
832
+ ## 0.7.1 - 2015-03-23
833
+
834
+ ### Changed
835
+
836
+ - Updated all outdated dependencies (insofar as possible)
837
+ - HSTS now uses Lodash like all the rest of the libraries
838
+
839
+ ## 0.7.0 - 2015-03-05
840
+
841
+ ### Added
842
+
843
+ - `hpkp` middleware
844
+
845
+ ### Changed
846
+
847
+ - Travis CI should test 0.10 and 0.12
848
+ - Minor code cleanup
849
+
850
+ ## 0.6.2 - 2015-03-01
851
+
852
+ ### Changed
853
+
854
+ - Improved `xssFilter` performance
855
+ - Updated Lodash versions
856
+
857
+ ## 0.6.1 - 2015-02-13
858
+
859
+ ### Added
860
+
861
+ - "Other recommended modules" in README
862
+
863
+ ### Changed
864
+
865
+ - Updated Lodash version
866
+
867
+ ### Fixed
868
+
869
+ - `frameguard` middleware exported a function called `xframe`
870
+
871
+ ## 0.6.0 - 2015-01-21
872
+
873
+ ### Added
874
+
875
+ - You can disable `csp` for Android
876
+
877
+ ### Fixed
878
+
879
+ - `csp` on Chrome Mobile on Android and iOS
880
+
881
+ ## 0.5.4 - 2014-12-21
882
+
883
+ ### Changed
884
+
885
+ - `nocache` should force revalidation
886
+
887
+ ## 0.5.3 - 2014-12-08
888
+
889
+ ### Changed
890
+
891
+ - `platform` version in CSP and X-XSS-Protection
892
+
893
+ ### Fixed
894
+
895
+ - Updated bad wording in frameguard docs
896
+
897
+ ## 0.5.2 - 2014-11-16
898
+
899
+ ### Changed
900
+
901
+ - Updated Connect version
902
+
903
+ ### Fixed
904
+
905
+ - Fixed minor `csp` bugfixes
906
+
907
+ ## 0.5.1 - 2014-11-09
908
+
909
+ ### Changed
910
+
911
+ - Updated URLs in `package.json` for new URL
912
+
913
+ ### Fixed
914
+
915
+ - CSP would set all headers forever after receiving an unknown user agent
916
+
917
+ ## 0.5.0 - 2014-10-28
918
+
919
+ ### Added
920
+
921
+ - Most middlewares have some aliases now
922
+
923
+ ### Changed
924
+
925
+ - `xframe` now called `frameguard` (though `xframe` still works)
926
+ - `frameguard` chooses sameorigin by default
927
+ - `frameguard` understands "SAME-ORIGIN" in addition to "SAMEORIGIN"
928
+ - `nocache` removed from default middleware stack
929
+ - Middleware split out into their own modules
930
+ - Documentation
931
+ - Updated supported Node version to at least 0.10.0
932
+ - Bumped Connect version
933
+
934
+ ### Removed
935
+
936
+ - Deprecation warnings
937
+
938
+ ### Fixed
939
+
940
+ - Readme link was broken
941
+
942
+ ## 0.4.2 - 2014-10-16
943
+
944
+ ### Added
945
+
946
+ - Support preload in HSTS header
947
+
948
+ ## 0.4.1 - 2014-08-24
949
+
950
+ ### Added
951
+
952
+ - Use [helmet-crossdomain](https://github.com/helmetjs/crossdomain) to test the waters
953
+ - 2 spaces instead of 4 throughout the code
954
+
955
+ ## 0.4.0 - 2014-07-17
956
+
957
+ ### Added
958
+
959
+ - `nocache` now sets the Expires and Pragma headers
960
+ - `nocache` now allows you to crush ETags
961
+
962
+ ### Changed
963
+
964
+ - Improved the docs for nosniff
965
+ - Reverted HSTS behavior of requiring a specified max-age
966
+
967
+ ### Fixed
968
+
969
+ - Allow HSTS to have a max-age of 0
970
+
971
+ ## 0.3.2 - 2014-06-30
972
+
973
+ ### Added
974
+
975
+ - All middleware functions are named
976
+ - Throw error with non-positive HSTS max-age
977
+
978
+ ### Changed
979
+
980
+ - Added semicolons in README
981
+ - Make some Errors more specific
982
+
983
+ ### Removed
984
+
985
+ - Removed all comment headers; refer to the readme
986
+
987
+ ### Fixed
988
+
989
+ - `helmet()` was having issues
990
+ - Fixed Syntax errors in README
991
+
992
+ This changelog was created after the release of 0.3.1.