Expand description
Axum rate limits with explicit peer/key and rejection-response boundaries.
Re-exports§
pub use crate::shared::rate_limit::NormalizedStringRateLimiter;pub use crate::shared::rate_limit::RateLimitRejection;
Structs§
- IpRate
Limit Config - State for
from_fn_with_state(config, ip_rate_limit). Clones share the same quota buckets. - Keyed
Rate Limit Config - State for keyed limits. Product code extracts the key; Forge trims and lowercases it.
Functions§
- ip_
rate_ limit - Applies trusted-proxy IP limits. Missing peers/UDS share a localhost bucket and ignore headers. Products should disable IP limits or use keyed limits on UDS deployments.
- keyed_
rate_ limit - Applies a normalized string quota, preserving product key-extraction errors.