Compare commits

..
4 Commits
Author SHA1 Message Date
Chris Troutner bb69a6dee9 Merge pull request #32 from Permissionless-Software-Foundation/ct-unstable
fix(rate limits): Increasing internal rate limits
2020-09-28 18:35:29 -07:00
Chris Troutner d67b3aa052 fix(rate limits): Increasing internal rate limits 2020-09-28 18:32:43 -07:00
Chris Troutner 7e1c3d6a73 Merge pull request #31 from Permissionless-Software-Foundation/ct-unstable
fix(hydrateUtxos): Bumping bch-js version to fix hydateUtxos
2020-09-28 18:13:43 -07:00
Chris Troutner 6165001790 fix(hydrateUtxos): Bumping bch-js version to fix hydateUtxos 2020-09-28 18:10:49 -07:00
3 changed files with 343 additions and 526 deletions
+336 -524
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -28,7 +28,7 @@
"node": ">=10.15.1"
},
"dependencies": {
"@psf/bch-js": "^3.5.5",
"@psf/bch-js": "^3.6.2",
"apidoc": "^0.23.0",
"axios": "^0.19.0",
"bitcore-lib-cash": "^8.20.3",
+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}.`
)