-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Priority:0Work that we can't release withoutWork that we can't release withoutapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-rate-limitWork related to use of rate limit primitivesWork related to use of rate limit primitives
Milestone
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)
}
}
majora2007, Misiu, russia and rf-0
Metadata
Metadata
Assignees
Labels
Priority:0Work that we can't release withoutWork that we can't release withoutapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-rate-limitWork related to use of rate limit primitivesWork related to use of rate limit primitives