Skip to content

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

@AtofStryker

Description

@AtofStryker

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

Metadata

Metadata

Assignees

Labels

topic: cy.originProblems or enhancements related to cy.origin command

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions