Hi,
Since the update to 4.3.x I receive 413 errors when posting large form datasets, regardless of which body-parser library i use.
Original
app.use(bodyParser.json({limit: '50mb'}));
app.use(bodyParser.urlencoded({ extended: true }));
New
app.use(express.json({limit: '50mb'}));
app.use(express.urlencoded({ extended: true }));
Is anyone else encountering issues with body-parser? it seems like whatever options I set are ignored.
Further Testing, no issues using Nest 4.2, maybe related to:
core: json and urlencoded (body-parser) middlewares are applied by default now, bugfix #252
https://github.com/nestjs/nest/issues/252
I see that bodyparser gets set in nest-application.ts
public setupParserMiddlewares() {
this.express.use(bodyParser.json());
this.express.use(bodyParser.urlencoded({ extended: true }));
}
But shouldn't I be able to override these with the above statements when starting server.js?
We need to set bodyParser.json({strict: false}) in our app.
Hi @Yang010 @danapier,
Will be fixed in the nearest update.
Please update your package into 4.5.0 and let me know whether it helps you 馃檪
fixed in 4.5.x, thanks!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @Yang010 @danapier,
Will be fixed in the nearest update.