From d66e9bb4a22f31c7e12b6df91c0d5f663dd2aafd Mon Sep 17 00:00:00 2001 From: filesite Date: Sun, 14 Apr 2024 18:05:19 +0800 Subject: [PATCH] change post data body size --- index.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.mjs b/index.mjs index 24dae2e..761a723 100644 --- a/index.mjs +++ b/index.mjs @@ -16,9 +16,9 @@ app.disable('x-powered-by'); app.use(express.static('public')); // parse application/x-www-form-urlencoded -app.use(bodyParser.urlencoded({ extended: false })) +app.use(bodyParser.urlencoded({ limit: '2mb', extended: false })) // parse application/json -app.use(bodyParser.json()) +app.use(bodyParser.json({ limit: '2mb' })) app.use('/api', apiRouter);