@middy/http-security-headers 2.5.0 → 2.5.4
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/index.js +10 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -6,6 +6,9 @@ const {
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
const defaults = {
|
|
9
|
+
// contentDisposition: {
|
|
10
|
+
// filename: undefined
|
|
11
|
+
// },
|
|
9
12
|
dnsPrefetchControl: {
|
|
10
13
|
allow: false
|
|
11
14
|
},
|
|
@@ -43,7 +46,13 @@ const defaults = {
|
|
|
43
46
|
}
|
|
44
47
|
};
|
|
45
48
|
const helmet = {};
|
|
46
|
-
const helmetHtmlOnly = {}; //
|
|
49
|
+
const helmetHtmlOnly = {}; // OWASP ASVS 14.4.2
|
|
50
|
+
// API Gateway strips out this header :(
|
|
51
|
+
// helmet.content = (headers, config) => {
|
|
52
|
+
// const filename = config.filename ?? `api.${headers?.['Content-Type'].split(/[/;]/)[1] ?? 'json'}`
|
|
53
|
+
// headers['Content-Disposition'] = `attachment; filename="${filename}"`
|
|
54
|
+
// }
|
|
55
|
+
// contentSecurityPolicy - N/A - no HTML
|
|
47
56
|
// featurePolicy - N/A - no HTML
|
|
48
57
|
// crossdomain - N/A - For Adobe products
|
|
49
58
|
// https://github.com/helmetjs/dns-Prefetch-control
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/http-security-headers",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "Applies best practice security headers to responses. It's a simplified port of HelmetJS",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"engines": {
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"url": "https://github.com/middyjs/middy/issues"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/middyjs/middy#readme",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "a4134a579c757a9fdfed3006877ba2c0ec8a2cfa",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@middy/util": "^2.5.
|
|
53
|
+
"@middy/util": "^2.5.4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@middy/core": "^2.5.
|
|
56
|
+
"@middy/core": "^2.5.4"
|
|
57
57
|
}
|
|
58
58
|
}
|