#[non_exhaustive]pub enum TrustForwardedFor {
None,
RightMost,
}Expand description
Which client address the key-check limit counts against
(TRUST_FORWARDED_FOR).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
none: the TCP peer address; every X-Forwarded-For is ignored.
Right when nothing sits in front of the proxy, and the default.
RightMost
heroku, or its synonym rightmost: the right-most
X-Forwarded-For entry, the one the proxy in front appended (Heroku’s
router does; so do Caddy and nginx with
$proxy_add_x_forwarded_for); everything to its left came from the
client and is ignored. Only right when every request reaches the
proxy through exactly one such proxy: without it a client can write
that entry itself.
Trait Implementations§
Source§impl Clone for TrustForwardedFor
impl Clone for TrustForwardedFor
impl Copy for TrustForwardedFor
Source§impl Debug for TrustForwardedFor
impl Debug for TrustForwardedFor
Source§impl Default for TrustForwardedFor
impl Default for TrustForwardedFor
impl Eq for TrustForwardedFor
Source§impl FromStr for TrustForwardedFor
impl FromStr for TrustForwardedFor
Source§impl PartialEq for TrustForwardedFor
impl PartialEq for TrustForwardedFor
impl StructuralPartialEq for TrustForwardedFor
Auto Trait Implementations§
impl Forget for TrustForwardedFor
impl Freeze for TrustForwardedFor
impl RefUnwindSafe for TrustForwardedFor
impl Send for TrustForwardedFor
impl Sync for TrustForwardedFor
impl Unpin for TrustForwardedFor
impl UnsafeUnpin for TrustForwardedFor
impl UnwindSafe for TrustForwardedFor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.