From dea65db2b39985cbee8995ab0718c93876107b1d Mon Sep 17 00:00:00 2001 From: binaryify Date: Wed, 8 May 2024 15:34:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=AD=E9=97=B4=E4=BB=B6=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.MD | 3 +++ package.json | 2 +- server.js | 6 ++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f8e4523..a0cb3b0 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,4 +1,7 @@ # 更新日志 +### 4.19.5 | 2024.05.08 +- 中间件问题修复 + ### 4.19.4 | 2024.05.07 - 参数接收问题修复 diff --git a/package.json b/package.json index fb5e0ed..534bb31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NeteaseCloudMusicApi", - "version": "4.19.4", + "version": "4.19.5", "description": "网易云音乐 NodeJS 版 API", "scripts": { "start": "node app.js", diff --git a/server.js b/server.js index 3feee0d..e28fece 100644 --- a/server.js +++ b/server.js @@ -135,8 +135,6 @@ async function consturctServer(moduleDefs) { const app = express() const { CORS_ALLOW_ORIGIN } = process.env app.set('trust proxy', true) - app.use(express.json({ limit: '50mb' })) - app.use(express.urlencoded({ limit: '50mb' })) /** * Serving static files @@ -178,8 +176,8 @@ async function consturctServer(moduleDefs) { /** * Body Parser and File Upload */ - app.use(express.json()) - app.use(express.urlencoded({ extended: false })) + app.use(express.json({ limit: '50mb' })) + app.use(express.urlencoded({ extended: false, limit: '50mb' })) app.use(fileUpload())