Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide support plugin to change electron user agent to exclude electron and cypress details #22953

Closed
AtofStryker opened this issue Jul 27, 2022 · 2 comments · Fixed by #22958
Assignees
Labels
topic: cy.origin Problems or enhancements related to cy.origin command

Comments

@AtofStryker
Copy link
Contributor

AtofStryker commented Jul 27, 2022

What would you like?

An official npm support plugin that rewrites the electron user agent to appear more chrome like and avoid blocked requests based on the user agent string.

Why is this needed?

Certain authentication providers 403/block requests coming from Electron user agents based of the User-Agent header in the request. Currently, for MacOS devices, the user agent for Cypress Electron looks something like :

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Cypress/0.0.0-development Chrome/100.0.4896.75 Electron/18.0.4 Safari/537.36

Ideally, we want the user agent to read as Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36 when this support plugin is installed to prevent 403s/block requests

Other

No response

@AtofStryker AtofStryker added the topic: cy.origin Problems or enhancements related to cy.origin command label Jul 27, 2022
@AtofStryker AtofStryker self-assigned this Jul 27, 2022
@AtofStryker AtofStryker linked a pull request Jul 27, 2022 that will close this issue
4 tasks
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: internal and removed stage: routed to e2e-auth stage: needs review The PR code is done & tested, needs review labels Jul 27, 2022
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 30, 2022

The code for this is done in cypress-io/cypress#22958, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 2, 2022

Released in 10.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v10.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cy.origin Problems or enhancements related to cy.origin command
Projects
None yet
1 participant