@middy/http-multipart-body-parser 7.1.1 → 7.1.2

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.
Files changed (2) hide show
  1. package/index.js +2 -1
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -11,6 +11,7 @@ const defaults = {
11
11
  // busboy options as per documentation: https://www.npmjs.com/package/busboy#busboy-methods
12
12
  busboy: {},
13
13
  charset: "utf8",
14
+ disableContentTypeCheck: false,
14
15
  disableContentTypeError: false,
15
16
  };
16
17
 
@@ -22,7 +23,7 @@ const httpMultipartBodyParserMiddleware = (opts = {}) => {
22
23
 
23
24
  const contentType = headers?.["content-type"] ?? headers?.["Content-Type"];
24
25
 
25
- if (!mimePattern.test(contentType)) {
26
+ if (!options.disableContentTypeCheck && !mimePattern.test(contentType)) {
26
27
  if (options.disableContentTypeError) {
27
28
  return;
28
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/http-multipart-body-parser",
3
- "version": "7.1.1",
3
+ "version": "7.1.2",
4
4
  "description": "HTTP multipart body parser middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -66,10 +66,10 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@fastify/busboy": "3.2.0",
69
- "@middy/util": "7.1.1"
69
+ "@middy/util": "7.1.2"
70
70
  },
71
71
  "devDependencies": {
72
- "@middy/core": "7.1.1",
72
+ "@middy/core": "7.1.2",
73
73
  "@types/aws-lambda": "^8.0.0",
74
74
  "type-fest": "^5.0.0"
75
75
  },