Closed
Description
- Review current implementation in aspnetlabs
- Ensure the middleware will work for YARP
- Release the middleware to get feedback
API Proposal:
namespace Microsoft.AspNetCore.RateLimiting
{
public sealed class RateLimitingOptions
{
public PartitionedRateLimiter<HttpContext> Limiter { get; set; }
public Func<HttpContext, RateLimitLease, Task> OnRejected { get; set; }
public HttpStatusCode RejectionStatusCode { get; set; }
}
public static class RateLimitingExtensions
{
public static IApplicationBuilder UseRateLimiting(this IApplicationBuilder app)
}
public static class RateLimitingServicesExtensions
{
public static IServiceCollection ConfigureRateLimiting(this IServiceCollection services, Action<RateLimitingOptions> configureOptions)
}
}