AspNetCoreRateLimit
AspNetCoreRateLimit copied to clipboard
Added some useful things
Hi, This PR contains the improvemnets I did for using it in our project. I provide you a PR just in case you are interested on merging it.
The new features added are:
- Added the possibility of stablish a range of ip adressed in comma separated format.
- Removed the need of adding a key in cache for rules with period 0
- Added HttpStatusCodeForLimitZeroRequests option, for returning a different https status code for matching rules with limit 0. In our case in that case we need to return a 404.
- Added DiscardEndpointGeneralRulesWhenExistsIPOrClienIdRule . It defines if general rules for an endpoint should be discarded if an ip o client id rule is defined for the same endpoint. By default they are only discarded if there is any rule for the same period.
Thank you for sharing your code on github