stefanprodan / AspNetCoreRateLimit

ASP.NET Core rate limiting middleware
MIT License
3.11k stars 447 forks source link

How to limit the number of unique clients overall? #482

Open gulzarahamed opened 2 months ago

gulzarahamed commented 2 months ago

It was working perfectly for number of requests per second, per minute, per hour based on unique client Id, but how to configure overall unique client per second, per minute, per hour

"ClientRateLimiting": { "EnableEndpointRateLimiting": true, "StackBlockedRequests": false, "HttpStatusCode": 429, "ClientIdHeader": "X-ClientId", "GeneralRules": [ { "endpoint": "post:/api/employees", "period": "1m", "limit": 10 }, { "endpoint": "post:/api/employees", "period": "1h", "limit": 50 }, { "endpoint": "post:/api/employees", "period": "1d", "limit": 200 }] }