Browse Source

fix: apply json size limit to graphql (#1480)

alancnet 5 years ago
parent
commit
de4d407fdc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/master.js

+ 1 - 1
server/master.js

@@ -84,6 +84,7 @@ module.exports = async () => {
   // GraphQL Server
   // ----------------------------------------
 
+  app.use(bodyParser.json({ limit: '1mb' }))
   await WIKI.servers.startGraphQL()
 
   // ----------------------------------------
@@ -99,7 +100,6 @@ module.exports = async () => {
   app.set('views', path.join(WIKI.SERVERPATH, 'views'))
   app.set('view engine', 'pug')
 
-  app.use(bodyParser.json({ limit: '1mb' }))
   app.use(bodyParser.urlencoded({ extended: false, limit: '1mb' }))
 
   // ----------------------------------------