quickchart icon indicating copy to clipboard operation
quickchart copied to clipboard

[BUG] EXPRESS_JSON_LIMIT env variable does not work.

Open ValiDrv opened this issue 1 year ago • 0 comments

If you POST over the default 100kb from process.env.EXPRESS_JSON_LIMIT, you get the 413 Payload Too Large error, so basically that variable is useless.

This can be fixed in index.js at line ~32

const json_limit = process.env.EXPRESS_JSON_LIMIT || '100kb';
app.use(
  express.json({
    limit: json_limit,                                       
  }),                                                             
);                       
const bodyParser = require('body-parser');
app.use(bodyParser.json({limit: json_limit}));
app.use(bodyParser.urlencoded({limit: json_limit, extended: true}));

ValiDrv avatar Jan 09 '23 19:01 ValiDrv