pub enum FilterMode {
Allowlist,
Blocklist,
}Expand description
Whether the CIDR list is an allowlist or a blocklist.
Used with IpFilterConfig::mode().
Variants§
Allowlist
Only requests from IPs matching a listed CIDR pass; all others are rejected.
[!WARNING] If the client IP cannot be extracted (header absent or unparseable), the request passes through unchecked. Ensure your reverse proxy always sets the configured IP header when using allowlist mode.
Blocklist
Requests from IPs matching a listed CIDR are rejected; all others pass.
Trait Implementations§
Source§impl Clone for FilterMode
impl Clone for FilterMode
Source§fn clone(&self) -> FilterMode
fn clone(&self) -> FilterMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FilterMode
impl RefUnwindSafe for FilterMode
impl Send for FilterMode
impl Sync for FilterMode
impl Unpin for FilterMode
impl UnsafeUnpin for FilterMode
impl UnwindSafe for FilterMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more