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

How do I get a self signed local domain be trusted in Cypress? #25802

Closed
TimPchelintsev opened this issue Feb 14, 2023 · 2 comments
Closed

How do I get a self signed local domain be trusted in Cypress? #25802

TimPchelintsev opened this issue Feb 14, 2023 · 2 comments
Assignees

Comments

@TimPchelintsev
Copy link

What would you like?

I want to get self signed local domain be trusted in Cypress

Why is this needed?

I am developing over https on localhost manually, and with mkcert help chrome accept certificate as trusted.
Common approach in Cypress is some manual testing after test finishes, so it will be nice to have local certificate trusted in Cypress too.

Other

No response

@flotwig
Copy link
Contributor

flotwig commented Feb 14, 2023

Hi @TimPchelintsev, Cypress intercepts HTTPS traffic for its core functionality, so there is currently no way to do this. More information: https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-a-way-to-give-a-proper-SSL-certificate-to-your-proxy-so-the-page-doesnt-show-up-as-not-secure

@flotwig flotwig closed this as completed Feb 15, 2023
@raylu
Copy link

raylu commented Jan 9, 2025

this definitely seems possible. mkcert creates a CA key at ~/.local/share/mkcert/rootCA-key.pem and adds the corresponding cert to the system's trust store (/etc/ssl/certs/ on linux). all cypress needs to do is use that CA to sign the certs it generates at

return path.join(this.keysFolder, 'ca.private.key')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants