Skip to content

Commit

Permalink
refactor: Use json parser when content type is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
farukaydin committed Oct 6, 2023
1 parent da9a789 commit 0386683
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ injectBullBoardHandler(app, serverAdapter);
appAssetsHandler(app);

app.use(morgan);

app.use(
express.json({
limit: appConfig.requestBodySizeLimit,
type: () => true,
verify(req, res, buf) {
(req as IRequest).rawBody = buf;
},
Expand Down

0 comments on commit 0386683

Please sign in to comment.