Use default middleware for parsing request body

This commit is contained in:
Cohee
2025-03-10 00:48:58 +02:00
parent 64206d6f47
commit 67d013e40a
44 changed files with 252 additions and 297 deletions

View File

@ -113,6 +113,9 @@ app.use(helmet({
app.use(compression());
app.use(responseTime());
app.use(bodyParser.json({ limit: '200mb' }));
app.use(bodyParser.urlencoded({ extended: true, limit: '200mb' }));
// CORS Settings //
const CORS = cors({
origin: 'null',
@ -135,9 +138,6 @@ if (cliArgs.listen) {
}
if (cliArgs.enableCorsProxy) {
app.use(bodyParser.json({
limit: '200mb',
}));
app.use('/proxy/:url(*)', corsProxyMiddleware);
} else {
app.use('/proxy/:url(*)', async (_, res) => {