mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-10-29 04:04:47 +01:00
correctly set limit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user