fix: headless UA override — platform-agnostic Akamai bypass#26
Merged
fix: headless UA override — platform-agnostic Akamai bypass#26
Conversation
Headless Chromium embeds "HeadlessChrome/..." in the default User-Agent. CDNs like Akamai reject these requests at the HTTP/2 layer with ERR_HTTP2_PROTOCOL_ERROR before any JS stealth patches can run. Override the context UA in headless mode with a clean Chrome string that uses the actual browser version and adapts the platform token to the host OS (macOS/Linux/Windows). Recovers 7 Akamai-fronted sites that were previously "unreachable" in headless mode (28/50 → ~35/50 expected).
drewstone
added a commit
that referenced
this pull request
Mar 19, 2026
Unpublished since 0.10.0: - feat: screenX/screenY CDP fix for Cloudflare Turnstile (#29) - fix: boost output tokens near max turns (#28) - feat: canvas fingerprint noise + stealth patches (#27) - fix: headless UA override — platform-agnostic Akamai bypass (#26) - fix: nightly CI — Xvfb headed stealth + system Chrome (#25) - feat: retry malformed JSON with minimal context (#24) - feat: three-tier history compression -22% cost (#23) - feat: headless passthrough + Docker benchmark runner (#22) - feat: WebVoyager + WebArena benchmark adapters (#20) - fix: graceful recovery from execute wall-clock timeouts (#21) - feat: showcase command for marketing asset capture (#18) - feat: research pipeline + speed-v1 experiment results (#19) - feat: design rip, compare, and extract-tokens overhaul (#17) - feat: CDP connection, browser profiles, and asset downloader (#16)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HeadlessChrome/...in User-Agent by defaultERR_HTTP2_PROTOCOL_ERROR) before any JS stealth patches runTest plan
pnpm buildpasses