Struct unleash_edge::cli::TrustProxy
source · pub struct TrustProxy {
pub trust_proxy: bool,
pub proxy_trusted_servers: Vec<NetworkAddr>,
}
Fields§
§trust_proxy: bool
By enabling the trust proxy option. Unleash Edge will have knowledge that it’s sitting behind a proxy and that the X-Forward-* header fields may be trusted, which otherwise may be easily spoofed.
Edge will use this to populate its context’s remoteAddress field
If you need to only trust specific ips or CIDR, enable this flag and then set --proxy-trusted-servers
proxy_trusted_servers: Vec<NetworkAddr>
Tells Unleash Edge which servers to trust the X-Forwarded-For. Accepts explicit Ip addresses or Cidrs (127.0.0.1/16). Accepts a comma separated list or multiple instances of the flag.
E.g --proxy-trusted-servers "127.0.0.1,192.168.0.1"
and --proxy-trusted-servers 127.0.0.1 --proxy-trusted-servers 192.168.0.1
are equivalent
Trait Implementations§
source§impl Args for TrustProxy
impl Args for TrustProxy
source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§impl Clone for TrustProxy
impl Clone for TrustProxy
source§fn clone(&self) -> TrustProxy
fn clone(&self) -> TrustProxy
Returns a copy 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 TrustProxy
impl Debug for TrustProxy
source§impl FromArgMatches for TrustProxy
impl FromArgMatches for TrustProxy
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Auto Trait Implementations§
impl Freeze for TrustProxy
impl RefUnwindSafe for TrustProxy
impl Send for TrustProxy
impl Sync for TrustProxy
impl Unpin for TrustProxy
impl UnwindSafe for TrustProxy
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