Table of Contents

Class ApplicationRateLimitingOptions

Namespace
ProjectTemplate.Web.Options
Assembly
ProjectTemplate.Web.dll

Represents template-level rate limiting configuration.

public sealed class ApplicationRateLimitingOptions
Inheritance
ApplicationRateLimitingOptions
Inherited Members

Fields

SectionName

Configuration section name for rate limiting settings.

public const string SectionName = "ProjectTemplate:RateLimiting"

Field Value

string

Properties

ConcurrencyPolicy

Gets or sets the concurrency-based rate limiting options applied at the template level.

public ConcurrencyRateLimitingOptions ConcurrencyPolicy { get; set; }

Property Value

ConcurrencyRateLimitingOptions

Enabled

Gets or sets a value indicating whether rate limiting is enabled.

public bool Enabled { get; set; }

Property Value

bool

FixedWindowPolicy

Gets or sets the fixed-window rate limiting options applied at the template level.

public FixedWindowRateLimitingOptions FixedWindowPolicy { get; set; }

Property Value

FixedWindowRateLimitingOptions

GlobalFixedWindow

Gets or sets the global fixed-window rate limiting options.

public FixedWindowRateLimitingOptions GlobalFixedWindow { get; set; }

Property Value

FixedWindowRateLimitingOptions

IPv6PartitionPrefixLength

Gets or sets the IPv6 prefix length used to group client addresses into one rate limiting partition.

public int IPv6PartitionPrefixLength { get; set; }

Property Value

int

Remarks

Defaults to 64. A single IPv6 subscriber commonly controls a whole /64 and can rotate addresses within it, so partitioning by full address would let one client bypass per-client limits. Use 128 to partition by full address. IPv4 and IPv4-mapped IPv6 addresses are always partitioned by their IPv4 address.

UnknownClientPartitionKey

Gets or sets the base fallback partition key used when the client IP address cannot be resolved.

public string UnknownClientPartitionKey { get; set; }

Property Value

string

UseGlobalLimiter

Gets or sets a value indicating whether to use the global limiter. When true, GlobalFixedWindow is used as a global limiter.

public bool UseGlobalLimiter { get; set; }

Property Value

bool

UseSharedUnknownClientPartition

Gets or sets a value indicating whether requests without a resolved client IP address share one fallback partition key.

public bool UseSharedUnknownClientPartition { get; set; }

Property Value

bool

Remarks

Defaults to true so unresolved clients remain rate limited. Setting this to false gives each unresolved request its own partition, which effectively disables client rate limiting for those requests.