pub enum AutoInferSetting {
Auto,
Never,
Legacy,
}
Expand description
Used to control the IP inference setting in relay. This is used as an alternative to magic values like {{auto}} in the user.ip_address field.
Variants§
Auto
Derive the IP address from the connection information.
Never
Do not derive the IP address, keep what was being sent by the client.
Legacy
Enables the legacy IP inference behaviour.
The legacy behavior works mainly by inspecting the content of user.ip_address
and
decides based on the value.
Unfortunately, not all platforms are treated equals so there are exceptions for
javascript
, cocoa
and objc
.
If the value in ip_address
is {{auto}}
, it will work the
same as AutoInferSetting::Auto
. This is true for all platforms.
If the value in ip_address
is None
, it will only infer the IP address if a
REMOTE_ADDR
header is sent in the request payload of the event.
NOTE: Setting ip_address
to None
will behave the same as setting it to {{auto}}
for javascript
, cocoa
and objc
.
Implementations§
Source§impl AutoInferSetting
impl AutoInferSetting
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Returns a string representation for AutoInferSetting
.
Trait Implementations§
Source§impl Clone for AutoInferSetting
impl Clone for AutoInferSetting
Source§fn clone(&self) -> AutoInferSetting
fn clone(&self) -> AutoInferSetting
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more