pub struct HeadlessConfig {
pub max_concurrent: usize,
pub chrome_executable: String,
pub block_images: bool,
pub block_fonts: bool,
pub block_media: bool,
pub block_css: bool,
pub block_third_party: bool,
pub block_service_workers: bool,
pub default_wait: String,
pub timeout_secs: u64,
pub auto_detect_spa: bool,
pub launch_delay_secs: u64,
}Expand description
[headless] configuration block. M9 adds browser/headless-fetch knobs.
Fields§
§max_concurrent: usize§chrome_executable: StringPath to a Chrome/Chromium executable. Empty string means auto-detect.
block_images: boolFulfill image requests with empty 200 (saves bandwidth + render time).
block_fonts: boolFulfill font requests with empty 200.
block_media: boolFulfill audio/video/track requests with empty 200.
block_css: boolFulfill CSS requests with empty 200. Default false — many SPAs need
layout to render correctly.
block_third_party: boolFulfill third-party analytics/tracker requests with empty 200.
block_service_workers: boolDisable service workers at browser init via CDP bypass. Honored by
HeadlessRenderer setup (not by the intercept handler).
default_wait: StringDefault wait condition: "domcontentloaded" or "networkidle0"
(wait for the network to fully settle — captures post-load XHR content).
timeout_secs: u64Per-render timeout in seconds (covers the wait phase).
auto_detect_spa: boolWhether HeadlessMode::Auto should run the SPA detection heuristic.
launch_delay_secs: u64In Auto mode, the delay (in seconds) before escalating to a headless
render once the plain HTTP fetch is in — i.e. between detecting that a
render is needed (an unrendered SPA, or a bot-protection challenge) and
launching/driving the browser. Gives the origin a breather between the
lightweight fetch and the heavier browser hit. 0 disables the pause.
Does not apply to On mode, which has no detection step.
Implementations§
Trait Implementations§
Source§impl Clone for HeadlessConfig
impl Clone for HeadlessConfig
Source§fn clone(&self) -> HeadlessConfig
fn clone(&self) -> HeadlessConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HeadlessConfig
impl Debug for HeadlessConfig
Source§impl Default for HeadlessConfig
impl Default for HeadlessConfig
Source§impl<'de> Deserialize<'de> for HeadlessConfig
impl<'de> Deserialize<'de> for HeadlessConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for HeadlessConfig
impl RefUnwindSafe for HeadlessConfig
impl Send for HeadlessConfig
impl Sync for HeadlessConfig
impl Unpin for HeadlessConfig
impl UnsafeUnpin for HeadlessConfig
impl UnwindSafe for HeadlessConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more