AspNetCore.Docs.Samples/fundamentals/middleware/rate-limit/WebRateLimitAuth/Models/MyRateLimitOptions.cs

16 lines
566 B
C#

namespace WebRateLimitAuth.Models;
public class MyRateLimitOptions
{
public const string MyRateLimit = "MyRateLimit";
public int PermitLimit { get; set; } = 100;
public int Window { get; set; } = 10;
public int ReplenishmentPeriod { get; set; } = 2;
public int QueueLimit { get; set; } = 2;
public int SegmentsPerWindow { get; set; } = 8;
public int TokenLimit { get; set; } = 10;
public int TokenLimit2 { get; set; } = 20;
public int TokensPerPeriod { get; set; } = 4;
public bool AutoReplenishment { get; set; } = false;
}