Changes
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace Shared.Models.Settings
|
||||
{
|
||||
public class RateLimitingSettings
|
||||
{
|
||||
public RateLimitPolicySettings Global { get; set; } = new();
|
||||
public Dictionary<string, RateLimitPolicySettings> Policies { get; set; } = new();
|
||||
}
|
||||
|
||||
public class RateLimitPolicySettings
|
||||
{
|
||||
public int PermitLimit { get; set; } = 100;
|
||||
|
||||
// Bound from configuration strings like "00:01:00" (1 minute) or "00:10:00" (10 minutes).
|
||||
public TimeSpan Window { get; set; } = TimeSpan.FromMinutes(1);
|
||||
|
||||
public int QueueLimit { get; set; } = 0;
|
||||
|
||||
public bool AutoReplenishment { get; set; } = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user