fix: 中间件问题修复

This commit is contained in:
binaryify 2024-05-08 15:34:54 +08:00
parent 5b30e1b222
commit dea65db2b3
3 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,7 @@
# 更新日志 # 更新日志
### 4.19.5 | 2024.05.08
- 中间件问题修复
### 4.19.4 | 2024.05.07 ### 4.19.4 | 2024.05.07
- 参数接收问题修复 - 参数接收问题修复

View File

@ -1,6 +1,6 @@
{ {
"name": "NeteaseCloudMusicApi", "name": "NeteaseCloudMusicApi",
"version": "4.19.4", "version": "4.19.5",
"description": "网易云音乐 NodeJS 版 API", "description": "网易云音乐 NodeJS 版 API",
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",

View File

@ -135,8 +135,6 @@ async function consturctServer(moduleDefs) {
const app = express() const app = express()
const { CORS_ALLOW_ORIGIN } = process.env const { CORS_ALLOW_ORIGIN } = process.env
app.set('trust proxy', true) app.set('trust proxy', true)
app.use(express.json({ limit: '50mb' }))
app.use(express.urlencoded({ limit: '50mb' }))
/** /**
* Serving static files * Serving static files
@ -178,8 +176,8 @@ async function consturctServer(moduleDefs) {
/** /**
* Body Parser and File Upload * Body Parser and File Upload
*/ */
app.use(express.json()) app.use(express.json({ limit: '50mb' }))
app.use(express.urlencoded({ extended: false })) app.use(express.urlencoded({ extended: false, limit: '50mb' }))
app.use(fileUpload()) app.use(fileUpload())