Compare commits

...
8 Commits
Author SHA1 Message Date
Chris Troutner e6dcaa2f24 Merge pull request #34 from Permissionless-Software-Foundation/ct-unstable
fix(rate limits): Fixing hydrateUtxos rate limits
2020-09-28 20:24:43 -07:00
Chris Troutner 698ac38251 fix(rate limits): Fixing hydrateUtxos rate limits 2020-09-28 20:17:07 -07:00
Chris Troutner 7c66ce7f73 Merge pull request #33 from Permissionless-Software-Foundation/ct-unstable
Increasing rate limits for hydrateUtxos()
2020-09-28 19:57:55 -07:00
Chris Troutner 9e3dfd9848 Updating package lock 2020-09-28 19:55:28 -07:00
Chris Troutner 10eb4da112 fix(rate limits): Increasing rate limits for internal calls 2020-09-28 19:49:49 -07:00
Chris Troutner f4f5f02a2f fix(bch-js): bumping to version 3.6.3 2020-09-28 19:45:47 -07:00
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
3 changed files with 10 additions and 5 deletions
+3 -3
View File
@@ -366,9 +366,9 @@
}
},
"@psf/bch-js": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-3.6.2.tgz",
"integrity": "sha512-6r8NBB48WgWHAFeuwrlkaE3B87TT3o/8hdjU1DOWXUx7lMFIF1Aq25CffUxF3sHP0pSx3/+4ulQZFROHGTwnDQ==",
"version": "3.6.3",
"resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-3.6.3.tgz",
"integrity": "sha512-0nqmLprZU+1lh1WTnAqVHQD+bIPJIcEQ36rBNoyh4ejzWZoQ7pTMj2r2I7JGhWmxWdSQ+g4stT1OrC4qmH6jdw==",
"requires": {
"@uppy/core": "^1.10.4",
"@uppy/tus": "^1.5.12",
+1 -1
View File
@@ -28,7 +28,7 @@
"node": ">=10.15.1"
},
"dependencies": {
"@psf/bch-js": "^3.6.2",
"@psf/bch-js": "^3.6.3",
"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}.`
)