#[non_exhaustive]#[repr(u32)]pub enum cef_referrer_policy_t {
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0,
REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1,
REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2,
REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3,
REFERRER_POLICY_ORIGIN = 4,
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5,
REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6,
REFERRER_POLICY_NO_REFERRER = 7,
REFERRER_POLICY_NUM_VALUES = 8,
}Expand description
Policy for how the Referrer HTTP header value will be sent during
navigation. If the --no-referrers command-line flag is specified then the
policy value will be ignored and the Referrer value will never be sent. Must
be kept synchronized with net::URLRequest::ReferrerPolicy from Chromium.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 0
Clear the referrer header if the header value is HTTPS but the request destination is HTTP. This is the default behavior.
REFERRER_POLICY_REDUCE_REFERRER_GRANULARITY_ON_TRANSITION_CROSS_ORIGIN = 1
A slight variant on CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE: If the request destination is HTTP, an HTTPS referrer will be cleared. If the request’s destination is cross-origin with the referrer (but does not downgrade), the referrer’s granularity will be stripped down to an origin rather than a full URL. Same-origin requests will send the full referrer.
REFERRER_POLICY_ORIGIN_ONLY_ON_TRANSITION_CROSS_ORIGIN = 2
Strip the referrer down to an origin when the origin of the referrer is different from the destination’s origin.
REFERRER_POLICY_NEVER_CLEAR_REFERRER = 3
Never change the referrer.
REFERRER_POLICY_ORIGIN = 4
Strip the referrer down to the origin regardless of the redirect location.
REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_CROSS_ORIGIN = 5
Clear the referrer when the request’s referrer is cross-origin with the request’s destination.
REFERRER_POLICY_ORIGIN_CLEAR_ON_TRANSITION_FROM_SECURE_TO_INSECURE = 6
Strip the referrer down to the origin, but clear it entirely if the referrer value is HTTPS and the destination is HTTP.
REFERRER_POLICY_NO_REFERRER = 7
Always clear the referrer regardless of the request destination.
REFERRER_POLICY_NUM_VALUES = 8
Always the last value in this enumeration.
Implementations§
Source§impl cef_referrer_policy_t
impl cef_referrer_policy_t
pub const REFERRER_POLICY_DEFAULT: cef_referrer_policy_t = cef_referrer_policy_t::REFERRER_POLICY_CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE
Trait Implementations§
Source§impl Clone for cef_referrer_policy_t
impl Clone for cef_referrer_policy_t
Source§fn clone(&self) -> cef_referrer_policy_t
fn clone(&self) -> cef_referrer_policy_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more