Skip to content

fix: improve Chromium fingerprint injection consistency#551

Closed
Kernalsmelly wants to merge 1 commit into
apify:masterfrom
Kernalsmelly:codex/apify-fingerprint-suite-178
Closed

fix: improve Chromium fingerprint injection consistency#551
Kernalsmelly wants to merge 1 commit into
apify:masterfrom
Kernalsmelly:codex/apify-fingerprint-suite-178

Conversation

@Kernalsmelly

Copy link
Copy Markdown

Summary

  • stop injecting generated accept-language through extra HTTP headers and pass the generated language through Playwright's native locale option instead
  • default helper-generated Chromium fingerprints to HTTP/1-style headers and add matching Chromium client hints when needed
  • make request-header filtering case-insensitive for HTTP/1 header casing
  • apply existing headless Chromium fixes after user-agent spoofing, hide configurable navigator.webdriver, and avoid injecting hidden-frame-sized top-level window dimensions

Why

Issue #178 tracks Chrome fingerprints becoming detectable as headless after injection. The live areyouheadless check is especially sensitive to Playwright extra HTTP headers: native locale still sends Accept-Language, but injecting the same value through extraHTTPHeaders flips the detector to headless. This keeps locale consistency while avoiding that extra-header signal, then covers other mismatches observed while reproducing the issue.

Verification

  • pnpm exec vitest run test/fingerprint-injector/fingerprint-injector.test.ts -t "filters request headers|native locale|defaults Chromium|applies headless Chromium fixes"
  • pnpm --filter generative-bayesian-network compile; pnpm --filter header-generator compile; pnpm --filter fingerprint-generator compile; pnpm --filter fingerprint-injector compile
  • pnpm exec prettier packages/fingerprint-injector/src/fingerprint-injector.ts packages/fingerprint-injector/src/utils.js test/fingerprint-injector/fingerprint-injector.test.ts --check
  • live https://arh.antoinevastel.com/bots/areyouheadless checks returned You are not Chrome headless for:
    • Playwright headless Chromium with a Windows Chrome fingerprint
    • Playwright headless Chromium with a Linux Chrome fingerprint
    • Puppeteer headless Chrome with a Windows Chrome fingerprint

Fixes #178

@algora-pbc /claim #178

@Kernalsmelly

Copy link
Copy Markdown
Author

@algora-pbc /claim #178

@barjin barjin closed this Jun 16, 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.

fingerprint injection makes browsers detectable as headless

4 participants