fix(e2e): bypass Fastly CAPTCHA on FxA stage with fxa-ci header#6621
Merged
Conversation
Fastly's dynamic CAPTCHA blocks headless Chromium on FxA stage. The fxa-ci header bypasses it, but Playwright's extraHTTPHeaders sends it on all requests. Third-party domains reject the custom header in CORS preflight, breaking the OAuth flow. Send fxa-ci globally via extraHTTPHeaders, then strip it from non-FxA domains with page.route() handlers.
5ec3741 to
b93a80a
Compare
EMMLynch
approved these changes
May 5, 2026
EMMLynch
left a comment
Collaborator
There was a problem hiding this comment.
Approved. This matches the changes made for Relay
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.
References:
Jira: https://mozilla-hub.atlassian.net/browse/MNTOR-5273
Description
Fastly's dynamic CAPTCHA blocks headless Chromium on FxA stage. The fxa-ci header bypasses it, but Playwright's extraHTTPHeaders sends it on all requests. Third-party domains reject the custom header in CORS preflight, breaking the OAuth flow.
Send fxa-ci globally via extraHTTPHeaders, then strip it from non-FxA domains with page.route() handlers.
Screenshot (if applicable)
How to test
https://github.com/mozilla/blurts-server/actions/runs/25343631607
Checklist (Definition of Done)
Localization strings (if needed) have been added.I've added or updated the relevant sections in readme and/or code commentsI've added a unit test to test for potential regressions of this bug.If this PR implements a feature flag or experimentation, I've checked that it still works with the flag both on, and with the flag off.If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been setProduct Owner accepted the User Story (demo of functionality completed) or waived the privilege.All acceptance criteria are met.