Skip to content

Commit cb62608

Browse files
authored
feat: Use only request interception when needed (#975)
Computes a needsInterception flag based on the options actually used (disableImages, blockDomains, blockUrls, disableRedirects, extraNavigationHTTPHeaders, contentUrl, postParams). setRequestInterception(true) and the abort/respond/continue rules are only registered when at least one is set; otherwise a passive listener still captures URLs for triggeredRequests(). Avoids CDP timing fingerprinting that anti-bot systems use to flag headless Chrome. Also refactors browser.cjs: options shorthand, for...of loops, closeBrowser helper, and request interception rules extracted into named handlers (blockImage, blockDomain, blockUrl, blockRedirect, respondWithPageContent, continueWithPostParams).
1 parent b18618f commit cb62608

2 files changed

Lines changed: 216 additions & 180 deletions

File tree

0 commit comments

Comments
 (0)