pub struct TrustedProxies { /* private fields */ }Expand description
The proxies whose forwarding headers are believed
Implementations§
Source§impl TrustedProxies
impl TrustedProxies
Sourcepub fn trust(self, cidr: &str) -> Result<Self, String>
pub fn trust(self, cidr: &str) -> Result<Self, String>
Trust a network or address, e.g. "10.0.0.0/8", "203.0.113.7", "fd00::/8"
Sourcepub fn private_networks() -> Self
pub fn private_networks() -> Self
Loopback, private (RFC 1918), link-local and unique-local addresses: a proxy inside your own network. Do not use it when untrusted machines can reach the service from such an address.
pub fn contains(&self, ip: IpAddr) -> bool
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for TrustedProxies
impl Clone for TrustedProxies
Source§impl Debug for TrustedProxies
impl Debug for TrustedProxies
Auto Trait Implementations§
impl Freeze for TrustedProxies
impl RefUnwindSafe for TrustedProxies
impl Send for TrustedProxies
impl Sync for TrustedProxies
impl Unpin for TrustedProxies
impl UnsafeUnpin for TrustedProxies
impl UnwindSafe for TrustedProxies
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