stefanprodan / WebApiThrottle

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

Using IpWhitelist while IpThrottling = false #91

Open asdegani opened 7 years ago

asdegani commented 7 years ago

Hi, I need to use throttling NOT based on user IP (i.e. a total of 100 requests per second from all users), but I want local requests to pass without being throttled. I tried setting IpThrottling = false and populating IpWhitelist, but the local requests are still being throttled. Is there a way to configure the throttler so my scenario will work? Thanks

stefanprodan commented 7 years ago

The IpWhitelist works only if you have enabled IpThrottling, see here

I could change this behavior and allow IP white listing no matter the policy.

avesse commented 7 years ago

I have a similar situation. I want to do only IpThrottling, i.e. you get throttled based on all requests from an IP, but have a list of white-listed endpoints.

avesse commented 7 years ago

FYI, my workaround is to not use a whitelist, but to use EndpointRules (or IpRules) with very high limits.