aspnetcore
aspnetcore copied to clipboard
RateLimitingMiddleware updates
Resolves https://github.com/dotnet/aspnetcore/issues/42667
- Change convenience methods to take
Action<Options>Rather than an Options instance - Add public attributes for enabling/disabling rate limiting
- Add IServiceCollection extension method
- Add extension method to put a policy instance directly on an endpoint
Still need to update the sample to use an MVC controller, which I'll do in this PR, but wanted to open it now to get eyes on it.
@wtgodbe, this change will be considered for inclusion in the blog post for the release it'll ship in. Nice work!
Please ensure that the original comment in this thread contains a clear explanation of what the change does, why it's important (what problem does it solve?), and, if relevant, include things like code samples and/or performance numbers.
This content may not be exactly what goes into the blog post, but it will help the team putting together the announcement.
Thanks!