Skip to content

Can't log/intercept/mock requests when document-domain is disabled by Feature Policy #6480

@AkA84

Description

@AkA84

Current behavior:

I have a site running on https, its server serving resources with the Feature Policy header document-domain directive set to none

Feature Policy: document-domain 'none'

As expected, not setting

"chromeWebSecurity": false

in cypress.json will result in Cypress failing to even reaching the site

1

If I set chromeWebSecurity to true, Cypress will be able to reach and perform actions on the site (in this case, logging in), but

  1. In the console I can still see an error being thrown about document.domain being disabled by the Feature Policy
  2. no XHR requests are being logged on the test runner
  3. most importantly, no XHR requests get intercepted by cy.route(), meaning that it's impossible to wait for them, or inspect their response, or mock their response

3

If I get rid of the document-domain directive, then the error is gone and the XHR requests are getting logged and intercepted as expected

4

Desired behavior:

The desired behaviour would be that setting

"chromeWebSecurity": false

would bypass the document-domain: none directive

Versions

cypress: 4.0.2
OS: macOS Catalina 10.15.3
browser: Chrome 80

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions