mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-22 01:02:05 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb69a6dee9 | ||
|
|
d67b3aa052 | ||
|
|
7e1c3d6a73 | ||
|
|
6165001790 | ||
|
|
77ba06d68c | ||
|
|
40f6b17d3b |
Generated
+336
-524
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -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",
|
||||
|
||||
@@ -135,6 +135,12 @@ class RateLimits {
|
||||
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