mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Merge pull request #183 from Permissionless-Software-Foundation/ct-unstable
fix(rate limits): Decreasing ANON rate limits from 20 to 10 RPM
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ const config = {
|
|||||||
// Rate Limits
|
// Rate Limits
|
||||||
anonRateLimit: process.env.ANON_RATE_LIMIT
|
anonRateLimit: process.env.ANON_RATE_LIMIT
|
||||||
? Number(process.env.ANON_RATE_LIMIT)
|
? Number(process.env.ANON_RATE_LIMIT)
|
||||||
: 500,
|
: 1000,
|
||||||
whitelistRateLimit: process.env.WHITELIST_RATE_LIMIT
|
whitelistRateLimit: process.env.WHITELIST_RATE_LIMIT
|
||||||
? Number(process.env.WHITELIST_RATE_LIMIT)
|
? Number(process.env.WHITELIST_RATE_LIMIT)
|
||||||
: 10,
|
: 10,
|
||||||
|
|||||||
@@ -326,7 +326,7 @@ describe('#rate-routelimit', () => {
|
|||||||
assert.property(val, 'error')
|
assert.property(val, 'error')
|
||||||
assert.include(
|
assert.include(
|
||||||
val.error,
|
val.error,
|
||||||
'Too many requests. Your limits are currently 20 requests per minute.'
|
'Too many requests. Your limits are currently 10 requests per minute.'
|
||||||
)
|
)
|
||||||
|
|
||||||
assert.equal(res.locals.rateLimitTriggered, true, 'Rate limits triggered')
|
assert.equal(res.locals.rateLimitTriggered, true, 'Rate limits triggered')
|
||||||
|
|||||||
Reference in New Issue
Block a user