pub struct TrustedProxyConfig { /* private fields */ }Expand description
Configured set of trusted reverse proxies.
Implementations§
Source§impl TrustedProxyConfig
impl TrustedProxyConfig
Sourcepub fn loopback_only() -> Self
pub fn loopback_only() -> Self
Trust only local loopback proxies (127.0.0.1/32 and ::1/128).
Sourcepub fn parse_list(csv: &str) -> Self
pub fn parse_list(csv: &str) -> Self
Parse comma-separated CIDRs (e.g. "127.0.0.1/32,10.0.0.0/8,::1/128").
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Load from ARKS_TRUSTED_PROXIES environment variable if set; otherwise loopback-only.
Setting ARKS_TRUSTED_PROXIES="" or "none" trusts zero proxies.
pub fn is_trusted(&self, ip: IpAddr) -> bool
Trait Implementations§
Source§impl Clone for TrustedProxyConfig
impl Clone for TrustedProxyConfig
Source§impl Debug for TrustedProxyConfig
impl Debug for TrustedProxyConfig
Source§impl Default for TrustedProxyConfig
impl Default for TrustedProxyConfig
impl Eq for TrustedProxyConfig
Source§impl PartialEq for TrustedProxyConfig
impl PartialEq for TrustedProxyConfig
impl StructuralPartialEq for TrustedProxyConfig
Auto Trait Implementations§
impl Forget for TrustedProxyConfig
impl Freeze for TrustedProxyConfig
impl Move for TrustedProxyConfig
impl RefUnwindSafe for TrustedProxyConfig
impl Send for TrustedProxyConfigwhere
RawVecInner: Send,
impl Sync for TrustedProxyConfigwhere
RawVecInner: Sync,
impl Unpin for TrustedProxyConfig
impl UnsafeUnpin for TrustedProxyConfig
impl UnwindSafe for TrustedProxyConfigwhere
RawVecInner: UnwindSafe,
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