mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 04:30:10 +01:00
Add 3GB file size limit to body parser middlewares (#2390)
This commit is contained in:
parent
e07535471f
commit
348d9c8285
@ -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,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user