Skip to content

[Epic]: Implement Rate Limiting Middleware in aspnetcore #37384

Closed
@rafikiassumani-msft

Description

@rafikiassumani-msft
  • 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)
    }
}

Metadata

Metadata

Assignees

Labels

Priority:0Work that we can't release withoutapi-approvedAPI was approved in API review, it can be implementedarea-middlewareIncludes: URL rewrite, redirect, response cache/compression, session, and other general middlewaresfeature-rate-limitWork related to use of rate limit primitives

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions