mirror of
https://github.com/metrico/qryn.git
synced 2025-03-14 10:07:18 +00:00
Custom Fastify bodyLimit (#70)
This commit is contained in:
@ -155,6 +155,9 @@ The following ENV Variables can be used to control cLoki parameters and backend
|
||||
| CLOKI_LOGIN | false | Basic HTTP Username |
|
||||
| CLOKI_PASSWORD | false | Basic HTTP Password |
|
||||
| READONLY | false | Readonly Mode, no DB Init |
|
||||
| FASTIFY_BODYLIMIT | 5242880 | API Maximum payload size in bytes |
|
||||
| FASTIFY_REQUESTTIMEOUT | 0 | API Maximum Request Timeout in ms |
|
||||
| FASTIFY_MAXREQUESTS | 0 | API Maximum Requests per socket |
|
||||
| DEBUG | false | Debug Mode |
|
||||
|
||||
|
||||
|
5
cloki.js
5
cloki.js
@ -44,7 +44,10 @@ if (!this.readonly) init(process.env.CLICKHOUSE_DB || 'cloki')
|
||||
|
||||
/* Fastify Helper */
|
||||
const fastify = require('fastify')({
|
||||
logger: false
|
||||
logger: false,
|
||||
bodyLimit: parseInt(process.env.FASTIFY_BODYLIMIT) || 5242880,
|
||||
requestTimeout: parseInt(process.env.FASTIFY_REQUESTTIMEOUT) || 0,
|
||||
maxRequestsPerSocket: parseInt(process.env.FASTIFY_MAXREQUESTS) || 0
|
||||
})
|
||||
|
||||
fastify.register(require('fastify-url-data'))
|
||||
|
Reference in New Issue
Block a user