AccountRateLimitOptions class
namespace: Serenity.Extensions assembly: Serenity.Extensions
Options for the rate limiter registered by AddAccountRateLimiter, which limits POST requests to account actions like login and forgot password per client IP address.
public class AccountRateLimitOptions
Public Members
| name | description |
|---|---|
| AccountRateLimitOptions() | The default constructor. |
| Enabled { get; set; } | Whether the rate limiting is enabled. Default is true. |
| Paths { get; set; } | Request paths (excluding the path base) that are rate limited for POST requests, with optional per path overrides. Each path has its own limit, e.g. login attempts do not use up the forgot password limit. Paths are matched case-insensitively, ignoring a trailing slash. Configuration is merged into the defaults, so a path can be added or overridden without repeating the others, e.g. "Paths": { "/Account/SignUp": { "PermitLimit": 5 } }, and a default path can be disabled with "PermitLimit": 0. |
| PermitLimit { get; set; } | Maximum number of requests allowed per client IP address and path within WindowSeconds. Default is 20. Keep in mind that users behind the same proxy or NAT share an IP address. |
| WindowSeconds { get; set; } | Length of the fixed window in seconds. Default is 60. |
| const SectionKey | The default section key in appsettings.json |
See Also
- Source: AccountRateLimitOptions.cs