Browse Source

fix: use body parser limit config with fallback value (#4985)

* permit bodyParserLimitSize configuration

set bodyParserLimitSize by default to 1mb
permit modifications by environment variable

* fix: use bodyparserlimit config with fallback default

Co-authored-by: Nicolas Giard <github@ngpixel.com>
pull/5021/head
matthgyver 2 years ago
committed by GitHub
parent
commit
7988fa62ca
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. 2
      server/master.js

2
server/master.js

@ -91,7 +91,7 @@ module.exports = async () => {
// GraphQL Server // GraphQL Server
// ---------------------------------------- // ----------------------------------------
app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit }))
app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit || '1mb' }))
await WIKI.servers.startGraphQL() await WIKI.servers.startGraphQL()
// ---------------------------------------- // ----------------------------------------

Loading…
Cancel
Save