mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
increase rate limit max requests per minutes
This commit is contained in:
parent
b6dafc082e
commit
0cd1ee9d89
1 changed files with 2 additions and 2 deletions
|
@ -7,11 +7,11 @@ const instanceApiRateLimiter = {
|
||||||
|
|
||||||
DDOSProtectionApiRateLimiter: (process.env.NODE_ENV === 'test' ? next : rateLimit({
|
DDOSProtectionApiRateLimiter: (process.env.NODE_ENV === 'test' ? next : rateLimit({
|
||||||
windowMs: 60 * 1000, // 1 minutes
|
windowMs: 60 * 1000, // 1 minutes
|
||||||
max: 100, // Limit each IP to 100 requests per `window`
|
max: 150, // Limit each IP to 150 requests per `window`
|
||||||
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
|
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers
|
||||||
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
|
legacyHeaders: false, // Disable the `X-RateLimit-*` headers
|
||||||
handler: (request, response, next, options) => {
|
handler: (request, response, next, options) => {
|
||||||
log.warn(`DDOS protection api rate limiter: > 100req/minute/ip ${request.ip}`)
|
log.warn(`DDOS protection api rate limiter: > 150req/minute/ip ${request.ip}`)
|
||||||
return response.status(options.statusCode).send(options.message)
|
return response.status(options.statusCode).send(options.message)
|
||||||
}
|
}
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Reference in a new issue