pub struct TargetConfig {Show 14 fields
pub ignore_https_errors: bool,
pub request_timeout: Duration,
pub viewport: Option<Viewport>,
pub request_intercept: bool,
pub cache_enabled: bool,
pub ignore_visuals: bool,
pub ignore_javascript: bool,
pub ignore_analytics: bool,
pub ignore_stylesheets: bool,
pub only_html: bool,
pub service_worker_enabled: bool,
pub extra_headers: Option<HashMap<String, String>>,
pub intercept_manager: NetworkInterceptManager,
pub max_bytes_allowed: Option<u64>,
}Expand description
Configuration for how a single target/page should be fetched and processed.
Fields§
§ignore_https_errors: boolWhether to ignore TLS/HTTPS certificate errors (e.g. self-signed or expired certs).
When true, connections will proceed even if certificate validation fails.
request_timeout: DurationRequest timeout to use for the main navigation / resource fetch. This is the total time allowed before a request is considered failed.
viewport: Option<Viewport>Optional browser viewport to use for this target.
When None, the default viewport (or headless browser default) is used.
request_intercept: boolEnable request interception for this target.
When true, all network requests will pass through the intercept manager.
cache_enabled: boolEnable caching for this target.
When true, responses may be read from and written to the cache layer.
ignore_visuals: boolIf true, skip visual/asset resources that are not required for HTML content
(e.g. images, fonts, media). Useful for performance-oriented crawls.
ignore_javascript: boolIf true, block JavaScript execution (or avoid loading JS resources)
for this target. This is useful for purely static HTML crawls.
ignore_analytics: boolIf true, block analytics / tracking requests (e.g. Google Analytics,
common tracker domains, etc.).
ignore_stylesheets: boolIf true, block stylesheets and related CSS resources for this target.
This can reduce bandwidth when only raw HTML is needed.
only_html: boolIf true, only HTML documents will be fetched/kept.
Non-HTML subresources may be skipped entirely.
service_worker_enabled: boolWhether service workers are allowed for this target.
When true, service workers may register and intercept requests.
extra_headers: Option<HashMap<String, String>>Extra HTTP headers to send with each request for this target. Keys should be header names, values their corresponding header values.
intercept_manager: NetworkInterceptManagerNetwork intercept manager used to make allow/deny/modify decisions
for requests when request_intercept is enabled.
max_bytes_allowed: Option<u64>The maximum number of response bytes allowed for this target. When set, responses larger than this limit may be truncated or aborted.
Trait Implementations§
Source§impl Clone for TargetConfig
impl Clone for TargetConfig
Source§fn clone(&self) -> TargetConfig
fn clone(&self) -> TargetConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more