diff --git a/core/server/web/api/v2/content/app.js b/core/server/web/api/v2/content/app.js index e8e1dca7e8..d945551e3f 100644 --- a/core/server/web/api/v2/content/app.js +++ b/core/server/web/api/v2/content/app.js @@ -1,5 +1,6 @@ const debug = require('ghost-ignition').debug('api'); const boolParser = require('express-query-boolean'); +const bodyParser = require('body-parser'); const express = require('express'); const shared = require('../../../shared'); const routes = require('./routes'); @@ -10,6 +11,9 @@ module.exports = function setupApiApp() { // API middleware + // @NOTE: req.body is undefined if we don't use this parser, this can trouble if components rely on req.body being present + apiApp.use(bodyParser.json({limit: '1mb'})); + // Query parsing apiApp.use(boolParser());