cypress: Login failed due to HTTPS and HTTP: This request has been blocked; the content must be served over HTTPS.

Application is HTTP and login App is HTTPS

Error:

Mixed Content: The page at 'https:/...' was loaded over HTTPS, but requested an insecure form action 'http://....'. This request has been blocked; the content must be served over HTTPS.

Windows 10 Electron 80

Question: is there is any setting or different way to resolve the issue? Basically looking for a setting to ignore HTTPS vs HTTP?

Cypress Version 4.2.0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (6 by maintainers)

Most upvoted comments

Already did cypress.json

{
  "chromeWebSecurity": false
}

But the browser I am using is Electron. Is there other setting for Electron ?

I get the same issue. The site works fine on https manually in Chrome but through Cypress I get: Mixed Content: The page at 'https://##.#####.########.net/__/#/tests/integration/signin_spec.js' was loaded over HTTPS, but requested an insecure frame 'http://##.#####.########.net/myfrontend/'. This request has been blocked; the content must be served over HTTPS.

The http://##.#####.########.net/myfrontend/ loads as an https page outside of Cypress.

In Firefox I also see this message: Strict-Transport-Security: The connection to the site is untrustworthy, so the specified header was ignored.

The certs for this site are generated locally using mkcert (https://github.com/FiloSottile/mkcert).

My page also uses window.location.origin to change from one https page to the next https page.

Can we re-open this ticket? The evidence here points to something occurring in Cypress that doesn’t occur in plain browsers.

@jennifer-shehane we are encountering same issue when a HTTPS website redirects to http site. cypress is blocking the http site to open. ON normal flow with manual steps, we see a warning in chrome asking to proceed or not but with cypress the redirect is totally blocked. Is there any way to bypass this or force cypress not to block?

same here

I have same problem with mixed content warning… Any solutions?

@jennifer-shehane we are encountering same issue when a HTTPS website redirects to http site. cypress is blocking the http site to open. ON normal flow with manual steps, we see a warning in chrome asking to proceed or not but with cypress the redirect is totally blocked. Is there any way to bypass this or force cypress not to block?

hey @monalijangale did you find anything interesting to solve it? I’m experiencing the same problem just now, trying to apply all the solutions I can find googling, but nothing works so far…