Skip to content

Commit

Permalink
Add 3GB file size limit to body parser middlewares (#2390)
Browse files Browse the repository at this point in the history
  • Loading branch information
blazeyo authored Sep 30, 2024
1 parent e075354 commit 348d9c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions collector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ const extensions = require("./extensions");
const { processRawText } = require("./processRawText");
const { verifyPayloadIntegrity } = require("./middleware/verifyIntegrity");
const app = express();
const FILE_LIMIT = "3GB";

app.use(cors({ origin: true }));
app.use(
bodyParser.text(),
bodyParser.json(),
bodyParser.text({ limit: FILE_LIMIT }),
bodyParser.json({ limit: FILE_LIMIT }),
bodyParser.urlencoded({
limit: FILE_LIMIT,
extended: true,
})
);
Expand Down

0 comments on commit 348d9c8

Please sign in to comment.