Browse Source
feat: use config value for json body parser limit
pull/5021/head
Nicolas Giard
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
10 additions and
1 deletions
-
config.sample.yml
-
server/app/data.yml
-
server/master.js
|
|
@ -130,3 +130,11 @@ ha: false |
|
|
|
# --------------------------------------------------------------------- |
|
|
|
# Writeable data path used for cache and temporary user uploads. |
|
|
|
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 |
|
|
|
offline: false |
|
|
|
ha: false |
|
|
|
bodyParserLimit: 5mb |
|
|
|
# DB defaults |
|
|
|
api: |
|
|
|
isEnabled: false |
|
|
|
|
|
@ -91,7 +91,7 @@ module.exports = async () => { |
|
|
|
// GraphQL Server
|
|
|
|
// ----------------------------------------
|
|
|
|
|
|
|
|
app.use(bodyParser.json({ limit: '1mb' })) |
|
|
|
app.use(bodyParser.json({ limit: WIKI.config.bodyParserLimit })) |
|
|
|
await WIKI.servers.startGraphQL() |
|
|
|
|
|
|
|
// ----------------------------------------
|
|
|
|