pub struct HttpsDataRefFetcher { /* private fields */ }Expand description
Default HTTPS-only fetcher.
Enforces:
SsrfPolicychecks on every URL (HTTPS-only, IP-literal rejection, private-range blocking).Range-freeGETwith a hard byte cap (default 16 MiB).- 30 s total timeout (matches RFC-ACDP-0006 §7.4 for registry RPCs).
Constructed via Self::new (default cap) or
Self::with_max_bytes.
Implementations§
Source§impl HttpsDataRefFetcher
impl HttpsDataRefFetcher
Sourcepub fn new() -> Self
pub fn new() -> Self
Build a fetcher with the default 16 MiB cap and the default
SsrfPolicy (HTTPS-only, no IP literals, no private ranges).
Sourcepub fn with_max_bytes(max_bytes: u64) -> Self
pub fn with_max_bytes(max_bytes: u64) -> Self
Build a fetcher with a custom response-size cap.
Sourcepub fn with_ssrf_policy(self, policy: SsrfPolicy) -> Self
pub fn with_ssrf_policy(self, policy: SsrfPolicy) -> Self
Replace the SsrfPolicy (useful for tests).
SEC-02: this rebuilds the underlying reqwest::Client so the new
policy is actually applied at the DNS layer. The HTTP client
carries a SafeDnsResolver hook, so the
resolver only takes effect on a client built with the policy —
mutating ssrf_policy alone would leave the old DNS filter wired
in.
Trait Implementations§
Source§impl DataRefFetcher for HttpsDataRefFetcher
impl DataRefFetcher for HttpsDataRefFetcher
Auto Trait Implementations§
impl !RefUnwindSafe for HttpsDataRefFetcher
impl !UnwindSafe for HttpsDataRefFetcher
impl Freeze for HttpsDataRefFetcher
impl Send for HttpsDataRefFetcher
impl Sync for HttpsDataRefFetcher
impl Unpin for HttpsDataRefFetcher
impl UnsafeUnpin for HttpsDataRefFetcher
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