diff --git a/config.sample.yml b/config.sample.yml index 316dd603..6f4fbdf3 100644 --- a/config.sample.yml +++ b/config.sample.yml @@ -130,3 +130,11 @@ ha: false # --------------------------------------------------------------------- # Writeable data path used for cache and temporary user uploads. dataPath: ./data + +# --------------------------------------------------------------------- +# Body Parser Limit +# --------------------------------------------------------------------- +# Maximum size of API requests body that can be parsed. Does not affect +# file uploads. + +bodyParserLimit: 5mb diff --git a/server/app/data.yml b/server/app/data.yml index 0e5e45e2..e80b43d6 100644 --- a/server/app/data.yml +++ b/server/app/data.yml @@ -26,6 +26,7 @@ defaults: logLevel: info offline: false ha: false + bodyParserLimit: 5mb # DB defaults api: isEnabled: false diff --git a/server/master.js b/server/master.js index fea5e34a..a1205abd 100644 --- a/server/master.js +++ b/server/master.js @@ -91,7 +91,7 @@ module.exports = async () => { // GraphQL Server // ---------------------------------------- - app.use(bodyParser.json({ limit: '1mb' })) + app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit })) await WIKI.servers.startGraphQL() // ----------------------------------------