mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
correctly set limit
This commit is contained in:
@@ -72,6 +72,7 @@ export default function attachMiddlewares (app, server) {
|
|||||||
|
|
||||||
app.use(bodyParser.urlencoded({
|
app.use(bodyParser.urlencoded({
|
||||||
extended: true, // Uses 'qs' library as old connect middleware
|
extended: true, // Uses 'qs' library as old connect middleware
|
||||||
|
limit: '10mb',
|
||||||
}));
|
}));
|
||||||
app.use(function bodyMiddleware (req, res, next) { // eslint-disable-line prefer-arrow-callback
|
app.use(function bodyMiddleware (req, res, next) { // eslint-disable-line prefer-arrow-callback
|
||||||
if (req.path === '/stripe/webhooks') {
|
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
|
// See https://stripe.com/docs/webhooks/signatures#verify-official-libraries
|
||||||
bodyParser.raw({ type: 'application/json' })(req, res, next);
|
bodyParser.raw({ type: 'application/json' })(req, res, next);
|
||||||
} else {
|
} else {
|
||||||
bodyParser.json()(req, res, next);
|
bodyParser.json({ limit: '10mb' })(req, res, next);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user