stefanprodan / WebApiThrottle

ASP.NET Web API rate limiter for IIS and Owin hosting
MIT License
1.28k stars 274 forks source link

Custom Routes vs Query String #99

Open mleonelli opened 7 years ago

mleonelli commented 7 years ago

As you point out in the documentation

If, from the same IP, in the same second, you'll make two calls to api/values, the last call will get blocked. But if in the same second you call api/values/1 too, the request will go through because it's a different route.

Is there any development / workaround to consider

/api/values and /api/values/{0}

the same in terms of throttling?

Considering the element as, let's say value_id, if you serve

/api/values?value_id={0}

The latter is counted in the same throttling as the collection call.