pub enum CloudflareTrust {
Off,
Static,
AutoRefresh {
interval: Duration,
},
}Expand description
Controls whether Cloudflare’s published edge IP ranges are treated as
trusted proxies for the purpose of honoring CF-Connecting-IP /
X-Forwarded-For request headers.
Cloudflare’s edge rotates IPs frequently, so hardcoding them is brittle.
AutoRefresh periodically re-fetches https://www.cloudflare.com/ips-v4
and …/ips-v6; Static uses a baked-in fallback list only.
Variants§
Off
Don’t treat any CF range as trusted. Safest default for servers that are not behind Cloudflare.
Static
Use the baked-in fallback list of CF CIDRs without refreshing.
AutoRefresh
Start with the baked-in list, then re-fetch CF’s published ranges on the given interval.
Trait Implementations§
Source§impl Clone for CloudflareTrust
impl Clone for CloudflareTrust
Source§fn clone(&self) -> CloudflareTrust
fn clone(&self) -> CloudflareTrust
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 moreSource§impl Debug for CloudflareTrust
impl Debug for CloudflareTrust
Source§impl Default for CloudflareTrust
impl Default for CloudflareTrust
Source§fn default() -> CloudflareTrust
fn default() -> CloudflareTrust
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CloudflareTrust
impl RefUnwindSafe for CloudflareTrust
impl Send for CloudflareTrust
impl Sync for CloudflareTrust
impl Unpin for CloudflareTrust
impl UnsafeUnpin for CloudflareTrust
impl UnwindSafe for CloudflareTrust
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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