feat: use config value for json body parser limit
This commit is contained in:
parent
91ce977a1a
commit
8e3af9ac15
@ -130,3 +130,11 @@ ha: false
|
|||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
# Writeable data path used for cache and temporary user uploads.
|
# Writeable data path used for cache and temporary user uploads.
|
||||||
dataPath: ./data
|
dataPath: ./data
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# Body Parser Limit
|
||||||
|
# ---------------------------------------------------------------------
|
||||||
|
# Maximum size of API requests body that can be parsed. Does not affect
|
||||||
|
# file uploads.
|
||||||
|
|
||||||
|
bodyParserLimit: 5mb
|
||||||
|
@ -26,6 +26,7 @@ defaults:
|
|||||||
logLevel: info
|
logLevel: info
|
||||||
offline: false
|
offline: false
|
||||||
ha: false
|
ha: false
|
||||||
|
bodyParserLimit: 5mb
|
||||||
# DB defaults
|
# DB defaults
|
||||||
api:
|
api:
|
||||||
isEnabled: false
|
isEnabled: false
|
||||||
|
@ -91,7 +91,7 @@ module.exports = async () => {
|
|||||||
// GraphQL Server
|
// GraphQL Server
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
|
|
||||||
app.use(bodyParser.json({ limit: '1mb' }))
|
app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit }))
|
||||||
await WIKI.servers.startGraphQL()
|
await WIKI.servers.startGraphQL()
|
||||||
|
|
||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user