node 后台接口返回413

https://www.npmjs.com/package/body-parser

limit

Controls the maximum request body size. If this is a number, then the value specifies the number of bytes; if it is a string, the value is passed to the bytes library for parsing. Defaults to '100kb'.

 

const bodyParser = require('body-parser')

  // parse application/x-www-form-urlencoded
  app.use(bodyParser.urlencoded({ limit: '100mb', extended: false }))
  // parse application/json
  app.use(bodyParser.json({ limit: '100mb' }))

我开发chatgpt网站:

https://chat.xutongbao.top

参考链接:

https://blog.csdn.net/zhuoganliwanjin/article/details/80110287

posted @ 2024-03-07 09:15  徐同保  阅读(13)  评论(0编辑  收藏  举报  来源