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

This commit is contained in:
alancnet 2020-02-15 19:35:53 -08:00 committed by GitHub
parent ea5027cb2e
commit de4d407fdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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' }))
// ----------------------------------------