stefanprodan / WebApiThrottle

ASP.NET Web API rate limiter for IIS and Owin hosting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should throttle policy settings be merged with default config?

ProNotion opened this issue · comments

I have the following in my web.config

<throttlePolicy limitPerSecond="2"
                  limitPerMinute="6"
                  limitPerHour="18"
                  limitPerDay="36"
                  limitPerWeek="100"
                  ipThrottling="true"
                  clientThrottling="true"
                  endpointThrottling="true" />

On one particular API controller action I have the following attribute:

[EnableThrottling(PerSecond = 2, PerMinute = 3)]

After 3 attempts to hit the endpoint within 3 minutes the throttle is applied but not just for the current user but for everyone. Does the attribute need to explicitly apply the ipThrottling boolean or should it inherit the config from the web.config and simply override the attributes set on the controller action?