pub enum SsrfPolicy {
PublicHttpsOnly,
AllowInternal,
}Expand description
SSRF validation policy for outbound HTTP clients.
PublicHttpsOnly is the default and enforces HTTPS + public IPs only.
AllowInternal relaxes both: permits private/loopback IPs and permits
HTTP scheme only when all resolved IPs are internal. Public IPs
over HTTP remain blocked to prevent cleartext credentials to the internet.
Variants§
Implementations§
Source§impl SsrfPolicy
impl SsrfPolicy
Sourcepub fn allows_internal(self) -> bool
pub fn allows_internal(self) -> bool
Returns true when internal/private addresses are permitted.
Trait Implementations§
Source§impl Clone for SsrfPolicy
impl Clone for SsrfPolicy
Source§fn clone(&self) -> SsrfPolicy
fn clone(&self) -> SsrfPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SsrfPolicy
Source§impl Debug for SsrfPolicy
impl Debug for SsrfPolicy
Source§impl Default for SsrfPolicy
impl Default for SsrfPolicy
Source§fn default() -> SsrfPolicy
fn default() -> SsrfPolicy
Returns the “default value” for a type. Read more
impl Eq for SsrfPolicy
Source§impl PartialEq for SsrfPolicy
impl PartialEq for SsrfPolicy
impl StructuralPartialEq for SsrfPolicy
Auto Trait Implementations§
impl Freeze for SsrfPolicy
impl RefUnwindSafe for SsrfPolicy
impl Send for SsrfPolicy
impl Sync for SsrfPolicy
impl Unpin for SsrfPolicy
impl UnsafeUnpin for SsrfPolicy
impl UnwindSafe for SsrfPolicy
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