GOOGLE ADS

jeudi 28 avril 2022

Getting Chrome to accept self-signed localhost certificate

I have created a self-signed SSL certificate for the localhost CN. Firefox accepts this certificate after initially complaining about it, as expected. Chrome and IE, however, refuse to accept it, even after adding the certificate to the system certificate store under Trusted Roots. Even though the certificate is listed as correctly installed when I click "View certificate information" in Chrome's HTTPS popup, it still insists the certificate cannot be trusted.

What am I supposed to do to get Chrome to accept the certificate and stop complaining about it?


Solution of the problem

For localhost only

Simply paste this in your chrome:

chrome://flags/#allow-insecure-localhost

You should see highlighted text saying:

Allow invalid certificates for resources loaded from localhost

Click Enable.

Other sites

Try typing thisisunsafe anywhere on the window, and the browser should let you visit the page.

-OR-

For a local self-signed cert that avoids arcane commands, specialized knowledge, and manual steps try mkcert from this answer.

Aucun commentaire:

Enregistrer un commentaire

Comment utiliseriez-vous .reduce() sur des arguments au lieu d'un tableau ou d'un objet spécifique ?

Je veux définir une fonction.flatten qui aplatit plusieurs éléments en un seul tableau. Je sais que ce qui suit n'est pas possible, mais...