mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
fix(rate limits): Increasing internal rate limits
This commit is contained in:
@@ -129,13 +129,18 @@ class RateLimits {
|
||||
origin &&
|
||||
(origin.toString().indexOf('wallet.fullstack.cash') > -1 ||
|
||||
origin.toString().indexOf('sandbox.fullstack.cash') > -1 ||
|
||||
origin.toString().indexOf('172.17.') > -1 ||
|
||||
origin === 'slp-api')
|
||||
) {
|
||||
pointsToConsume = 1
|
||||
res.locals.pointsToConsume = pointsToConsume // Feedback for tests.
|
||||
}
|
||||
|
||||
// Apply paid-access rate limits based on key/IP
|
||||
if (key.toString().indexOf('172.17.') > -1) {
|
||||
pointsToConsume = 1
|
||||
res.locals.pointsToConsume = pointsToConsume // Feedback for tests.
|
||||
}
|
||||
|
||||
wlogger.info(
|
||||
`User ${key} consuming ${pointsToConsume} point for resource ${resource}.`
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user