Skip to content
Snippets Groups Projects
Unverified Commit 348d9c82 authored by Blazej Owczarczyk's avatar Blazej Owczarczyk Committed by GitHub
Browse files

Add 3GB file size limit to body parser middlewares (#2390)

parent e0753547
No related branches found
No related tags found
No related merge requests found
...@@ -16,12 +16,14 @@ const extensions = require("./extensions"); ...@@ -16,12 +16,14 @@ const extensions = require("./extensions");
const { processRawText } = require("./processRawText"); const { processRawText } = require("./processRawText");
const { verifyPayloadIntegrity } = require("./middleware/verifyIntegrity"); const { verifyPayloadIntegrity } = require("./middleware/verifyIntegrity");
const app = express(); const app = express();
const FILE_LIMIT = "3GB";
app.use(cors({ origin: true })); app.use(cors({ origin: true }));
app.use( app.use(
bodyParser.text(), bodyParser.text({ limit: FILE_LIMIT }),
bodyParser.json(), bodyParser.json({ limit: FILE_LIMIT }),
bodyParser.urlencoded({ bodyParser.urlencoded({
limit: FILE_LIMIT,
extended: true, extended: true,
}) })
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment