pub struct UrlValidationConfig {
pub allowed_schemes: HashSet<String>,
pub block_private_ips: bool,
pub block_localhost: bool,
pub blocked_domains: HashSet<String>,
pub allowed_domains: HashSet<String>,
pub max_redirects: usize,
}Expand description
Configuration for URL validation
Fields§
§allowed_schemes: HashSet<String>Allowed URL schemes (default: [“http”, “https”])
block_private_ips: boolBlock private/local IP addresses (default: true)
block_localhost: boolBlock localhost addresses (default: true)
blocked_domains: HashSet<String>Domain blacklist
allowed_domains: HashSet<String>Domain whitelist (if not empty, only these domains are allowed)
max_redirects: usizeMaximum number of redirects allowed
Trait Implementations§
Source§impl Clone for UrlValidationConfig
impl Clone for UrlValidationConfig
Source§fn clone(&self) -> UrlValidationConfig
fn clone(&self) -> UrlValidationConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UrlValidationConfig
impl Debug for UrlValidationConfig
Auto Trait Implementations§
impl Freeze for UrlValidationConfig
impl RefUnwindSafe for UrlValidationConfig
impl Send for UrlValidationConfig
impl Sync for UrlValidationConfig
impl Unpin for UrlValidationConfig
impl UnwindSafe for UrlValidationConfig
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