AspNetCoreRateLimit
AspNetCoreRateLimit copied to clipboard
[Question] Use best match rule instead of most restrictive rule
Hello guys,
Title says it all, I'd like to implement rate-limiting on my Api with every endpoints being blocked after 40 requests with a 60s period except for some endpoints where I'd like to limit it to 120 requests per 60s.
Here's what I've done
{
"Endpoint": ".+",
"Period": "60s",
"Limit": 40
},
{
"Endpoint": ":/api/thingy/V2/.+",
"Period": "60s",
"Limit": 120
}
But for example, endpoint /api/thingy/V2/values
is blocked after 40 requests.
Is there a way to use the best matching rule? Or the first one that matches so we can rearrange the list order?
Try to change the order.
I tried, it doesn't change the behavior
I tried, it doesn't change the behavior
I have encountered the same problem. Have you solved it?