pub struct HttpTransportPolicy {
pub allow_insecure_http: bool,
pub auth_proxy_hosts: Vec<(String, bool)>,
pub same_origin_redirects: bool,
}Expand description
Custom HTTP transports must check the initial destination and every redirect with this policy before sending. A request without a policy keeps the embedder’s existing transport behavior.
Fields§
§allow_insecure_http: bool§auth_proxy_hosts: Vec<(String, bool)>Ordered, first-match-wins host rules, including their cleartext opt-ins.
same_origin_redirects: boolSet only after auth-proxy injection. Never forward injected credentials to a different scheme, host, or effective port.
Implementations§
Source§impl HttpTransportPolicy
impl HttpTransportPolicy
pub fn check_destination(&self, url: &Url) -> Result<(), TransportPolicyError>
pub fn check_redirect( &self, initial: &Url, next: &Url, ) -> Result<(), TransportPolicyError>
Trait Implementations§
Source§impl Clone for HttpTransportPolicy
impl Clone for HttpTransportPolicy
Source§impl Debug for HttpTransportPolicy
impl Debug for HttpTransportPolicy
impl Eq for HttpTransportPolicy
Source§impl PartialEq for HttpTransportPolicy
impl PartialEq for HttpTransportPolicy
impl StructuralPartialEq for HttpTransportPolicy
Auto Trait Implementations§
impl Freeze for HttpTransportPolicy
impl RefUnwindSafe for HttpTransportPolicy
impl Send for HttpTransportPolicy
impl Sync for HttpTransportPolicy
impl Unpin for HttpTransportPolicy
impl UnsafeUnpin for HttpTransportPolicy
impl UnwindSafe for HttpTransportPolicy
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.