mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Getting ready to refactor another tier
This commit is contained in:
+1
-1
@@ -87,7 +87,7 @@ app.use(`/${v3prefix}/`, auth.mw())
|
||||
// Rate limit on all v3 routes
|
||||
// Establish and enforce rate limits.
|
||||
// app.use(`/${v3prefix}/`, rateLimits.routeRateLimit)
|
||||
app.use(`/${v3prefix}/`, rateLimits.newRateLimit)
|
||||
app.use(`/${v3prefix}/`, rateLimits.rateLimitByResource)
|
||||
|
||||
app.use(`/${v3prefix}/` + `health-check`, healthCheckV3)
|
||||
app.use(`/${v3prefix}/` + `blockchain`, blockchainV3.router)
|
||||
|
||||
@@ -233,7 +233,7 @@ class RateLimits {
|
||||
This is the new rate limit function that uses the rate-limiter-flexible npm
|
||||
library.
|
||||
*/
|
||||
async newRateLimit(req, res, next) {
|
||||
async rateLimitByResource(req, res, next) {
|
||||
try {
|
||||
let userId
|
||||
let decoded = {}
|
||||
|
||||
Reference in New Issue
Block a user