mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
correctly set limit
This commit is contained in:
parent
5d1346e65c
commit
0754c0ff05
1 changed files with 2 additions and 1 deletions
|
|
@ -72,6 +72,7 @@ export default function attachMiddlewares (app, server) {
|
|||
|
||||
app.use(bodyParser.urlencoded({
|
||||
extended: true, // Uses 'qs' library as old connect middleware
|
||||
limit: '10mb',
|
||||
}));
|
||||
app.use(function bodyMiddleware (req, res, next) { // eslint-disable-line prefer-arrow-callback
|
||||
if (req.path === '/stripe/webhooks') {
|
||||
|
|
@ -79,7 +80,7 @@ export default function attachMiddlewares (app, server) {
|
|||
// See https://stripe.com/docs/webhooks/signatures#verify-official-libraries
|
||||
bodyParser.raw({ type: 'application/json' })(req, res, next);
|
||||
} else {
|
||||
bodyParser.json()(req, res, next);
|
||||
bodyParser.json({ limit: '10mb' })(req, res, next);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue