pub struct EgressPolicy {
pub allow_private: bool,
pub allowed_hosts: Vec<String>,
pub denied_hosts: Vec<String>,
pub allowed_schemes: Vec<String>,
pub max_redirects: usize,
pub max_response_bytes: usize,
pub connect_timeout: Duration,
pub read_timeout: Duration,
pub total_timeout: Duration,
pub proxy: Option<String>,
}Expand description
Rules for outbound HTTP requests made by workflow nodes.
Fields§
§allow_private: boolAllow loopback, private, link-local and other non-public addresses. Off by default: workflows are untrusted input.
allowed_hosts: Vec<String>If non-empty, only these hosts may be contacted. Entries match the host exactly,
or any subdomain when written as *.example.com or .example.com.
denied_hosts: Vec<String>Hosts that may never be contacted (same matching rules). Checked before allowed_hosts.
allowed_schemes: Vec<String>Permitted URL schemes.
max_redirects: usizeMaximum redirects followed (each hop is re-validated). 0 disables redirects.
max_response_bytes: usizeMaximum response body size in bytes.
connect_timeout: Duration§read_timeout: DurationMaximum idle time between reads.
total_timeout: DurationDefault total request timeout when a node does not configure one.
proxy: Option<String>Optional egress proxy URL. Environment proxy variables are always ignored.
Implementations§
Source§impl EgressPolicy
impl EgressPolicy
Sourcepub fn trusted() -> Self
pub fn trusted() -> Self
A policy for trusted, operator-configured endpoints (e.g. a code sandbox): private addresses allowed, everything else default.
Sourcepub fn check_url(&self, url: &Url) -> Result<(), EgressError>
pub fn check_url(&self, url: &Url) -> Result<(), EgressError>
Validate a URL before sending a request or following a redirect.
Sourcepub fn check_host_name(&self, host: &str) -> Result<(), EgressError>
pub fn check_host_name(&self, host: &str) -> Result<(), EgressError>
Check a host name against the allow / deny lists.
Trait Implementations§
Source§impl Clone for EgressPolicy
impl Clone for EgressPolicy
Source§impl Debug for EgressPolicy
impl Debug for EgressPolicy
Source§impl Default for EgressPolicy
impl Default for EgressPolicy
impl Eq for EgressPolicy
Source§impl PartialEq for EgressPolicy
impl PartialEq for EgressPolicy
impl StructuralPartialEq for EgressPolicy
Auto Trait Implementations§
impl Forget for EgressPolicy
impl Freeze for EgressPolicy
impl Move for EgressPolicy
impl RefUnwindSafe for EgressPolicy
impl Send for EgressPolicy
impl Sync for EgressPolicy
impl Unpin for EgressPolicy
impl UnsafeUnpin for EgressPolicy
impl UnwindSafe for EgressPolicy
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> 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§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
key and return true if they are equal.