stefanprodan / WebApiThrottle

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

Configurable filter per API from configuration file #135

Open giladsu opened 4 years ago

giladsu commented 4 years ago

IIUC, filters per API are configurable using the EnableThrottling attribute. Is there a way to configure this from a configuration file?

Seems like defining a new attribute that derives from EnableThrottling and reads from a config file in the ctor would work, but is there a different way.

javafun commented 4 years ago

@giladsu Is this what you need?

https://github.com/stefanprodan/WebApiThrottle#define-rate-limits-in-webconfig-or-appconfig

You can use rule instead of attribute