pub struct HttpPushSenderConfig {
pub timeout: Duration,
pub fail_on_error: bool,
pub validate_urls: bool,
}Expand description
Configuration for HttpPushSender.
Fields§
§timeout: DurationHTTP request timeout (default: 30s).
fail_on_error: boolIf true, push sending errors abort execution.
validate_urls: boolIf true (default), guard push URLs against SSRF. A string pre-check (scheme must be http/https; host must not be a loopback, private, link-local, multicast, unspecified, or cloud-metadata literal) fails before any network activity. A connect-time resolver then drops any resolved address in those ranges before dialing, so a hostname cannot reach a blocked address through DNS (split-horizon, attacker-controlled records, or rebinding). Redirects are re-screened per hop with the same string check, and the sender uses no system proxy, since either path would otherwise reach an address the guard never saw. Disable only when pushing to local webhooks in trusted test environments; that turns off the whole guard.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpPushSenderConfig
impl RefUnwindSafe for HttpPushSenderConfig
impl Send for HttpPushSenderConfig
impl Sync for HttpPushSenderConfig
impl Unpin for HttpPushSenderConfig
impl UnsafeUnpin for HttpPushSenderConfig
impl UnwindSafe for HttpPushSenderConfig
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request