stefanprodan / AspNetCoreRateLimit

ASP.NET Core rate limiting middleware
MIT License
3.12k stars 445 forks source link

Add a rule for all endpoints with an exception for few #485

Open EmmanuelPonnudurai opened 3 months ago

EmmanuelPonnudurai commented 3 months ago

Hello. I need to be able to set one rule for All() endpoints and then a specific for one specific endpoint. I've tried as specified below but it doesn't work. Looks like the `` rule overrides anything else.

"GeneralRules": [
  {
  "endpoint": "*",
  "period": "1m",
  "limit": 10
  },
  {
  "endpoint": "post:/api/foo",
  "period": "1h",
  "limit": 100
  }
]

How can I go about achieving something like this?

lflewwelling commented 2 months ago

Do you have EnableEndpointRateLimiting set to true?