Merge pull request #32 from Permissionless-Software-Foundation/ct-unstable

fix(rate limits): Increasing internal rate limits
This commit is contained in:
Chris Troutner
2020-09-28 18:35:29 -07:00
committed by GitHub
+6 -1
View File
@@ -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}.`
)