Skip to content

fix(renderer): send modern UA on CDP path (setUserAgentOverride)#184

Merged
us merged 1 commit into
mainfrom
feat/cdp-ua-override
Jun 23, 2026
Merged

fix(renderer): send modern UA on CDP path (setUserAgentOverride)#184
us merged 1 commit into
mainfrom
feat/cdp-ua-override

Conversation

@us

@us us commented Jun 23, 2026

Copy link
Copy Markdown
Owner

JS-rendered scrapes used the renderer's stale default UA → "browser outdated" gates (reported live). #176 only fixed HTTP-only. This applies the same effective_ua over CDP via Network.setUserAgentOverride in fetch_inner — session-scoped, after Network.enable/before navigate, best-effort (.ok() so lightpanda can't abort a render). All 4 tiers covered. Plan→3x review→implement→2x code-review→revise. clippy+208 tests green (cdp feature). Ships in v0.18.2.

JS-rendered scrapes went through the CDP renderer (lightpanda/chrome), which
sent the browser's own — often stale — User-Agent. UA-gating sites then showed
"your browser is outdated", even after #176 (that only fixed the HTTP-only
fetcher). Thread the same effective_ua into CdpRenderer and apply it via
Network.setUserAgentOverride in fetch_inner: session-scoped (no pool leak),
after Network.enable / before navigate, best-effort (.ok() so lightpanda not
supporting the method can't abort a render). HTTP and CDP now present the same
UA. All four renderer tiers (lightpanda/playwright/chrome/chrome_proxy) covered.
@us us merged commit ffcf564 into main Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant