Unverified Commit de4d407f authored by alancnet's avatar alancnet Committed by GitHub

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

parent ea5027cb
...@@ -84,6 +84,7 @@ module.exports = async () => { ...@@ -84,6 +84,7 @@ module.exports = async () => {
// GraphQL Server // GraphQL Server
// ---------------------------------------- // ----------------------------------------
app.use(bodyParser.json({ limit: '1mb' }))
await WIKI.servers.startGraphQL() await WIKI.servers.startGraphQL()
// ---------------------------------------- // ----------------------------------------
...@@ -99,7 +100,6 @@ module.exports = async () => { ...@@ -99,7 +100,6 @@ module.exports = async () => {
app.set('views', path.join(WIKI.SERVERPATH, 'views')) app.set('views', path.join(WIKI.SERVERPATH, 'views'))
app.set('view engine', 'pug') app.set('view engine', 'pug')
app.use(bodyParser.json({ limit: '1mb' }))
app.use(bodyParser.urlencoded({ extended: false, limit: '1mb' })) app.use(bodyParser.urlencoded({ extended: false, limit: '1mb' }))
// ---------------------------------------- // ----------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment