pub struct RateLimitingSecurityConfig {Show 16 fields
pub enabled: bool,
pub requests_per_second: u32,
pub burst_size: u32,
pub auth_start_max_requests: u32,
pub auth_start_window_secs: u64,
pub auth_callback_max_requests: u32,
pub auth_callback_window_secs: u64,
pub auth_refresh_max_requests: u32,
pub auth_refresh_window_secs: u64,
pub auth_logout_max_requests: u32,
pub auth_logout_window_secs: u64,
pub failed_login_max_attempts: u32,
pub failed_login_lockout_secs: u64,
pub requests_per_second_per_user: Option<u32>,
pub redis_url: Option<String>,
pub trust_proxy_headers: bool,
}Expand description
Per-endpoint and global rate limiting configuration for [security.rate_limiting].
Fields§
§enabled: boolEnable rate limiting
requests_per_second: u32Global request rate cap (requests per second, per IP)
burst_size: u32Burst allowance above the steady-state rate
auth_start_max_requests: u32Auth initiation endpoint — max requests per window
auth_start_window_secs: u64Auth initiation window in seconds
auth_callback_max_requests: u32OAuth callback endpoint — max requests per window
auth_callback_window_secs: u64OAuth callback window in seconds
auth_refresh_max_requests: u32Token refresh endpoint — max requests per window
auth_refresh_window_secs: u64Token refresh window in seconds
auth_logout_max_requests: u32Logout endpoint — max requests per window
auth_logout_window_secs: u64Logout window in seconds
failed_login_max_attempts: u32Failed login attempts before lockout
failed_login_lockout_secs: u64Duration of failed-login lockout in seconds
requests_per_second_per_user: Option<u32>Per-authenticated-user request rate in requests/second.
Defaults to 10× requests_per_second if not set.
redis_url: Option<String>Redis URL for distributed rate limiting (optional — falls back to in-memory)
trust_proxy_headers: boolTrust X-Real-IP / X-Forwarded-For headers for client IP extraction.
Set to true only when FraiseQL is deployed behind a trusted reverse proxy
(e.g. nginx, Cloudflare, AWS ALB) that sets these headers.
Enabling without a trusted proxy allows clients to spoof their IP address.
Trait Implementations§
Source§impl Clone for RateLimitingSecurityConfig
impl Clone for RateLimitingSecurityConfig
Source§fn clone(&self) -> RateLimitingSecurityConfig
fn clone(&self) -> RateLimitingSecurityConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more