sourcefuse / loopback4-ratelimiter

A Rate Limiting Extension for Loopback 4 Applications
https://www.npmjs.com/package/loopback4-ratelimiter
MIT License
37 stars 10 forks source link

config not working with sequence middleware #181

Open moetezch opened 2 months ago

moetezch commented 2 months ago

I registered the rate limiter like the following but it is enabled for all routes

To Reproduce

   this.bind(RateLimitSecurityBindings.RATELIMITCONFIG).to({
      RatelimitActionMiddleware: true,
    });
    this.bind(RateLimitSecurityBindings.CONFIG).to({
      name: 'redis',
      type: 'RedisStore',
      enabledByDefault: false,
    });
    this.component(RateLimiterComponent );

Expected behavior

rateLimit should be disabled for all routes

Additional context

 "loopback4-ratelimiter": "7.0.2"
  "@loopback/core": "6.0.2",
  "@loopback/express": "7.0.2",
moetezch commented 1 month ago

@yeshamavani @ashishkaushik can you please check