Getting Chrome to accept self-signed localhost certificate

后端 未结 30 3360
小蘑菇
小蘑菇 2020-11-21 11:30

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

30条回答
  •  没有蜡笔的小新
    2020-11-21 12:02

    1. Add the CA certificate in the trusted root CA Store.

    2. Go to chrome and enable this flag!

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

    At last, simply use the *.me domain or any valid domains like *.com and *.net and maintain them in the host file. For my local devs, I use *.me or *.com with a host file maintained as follows:

    1. Add to host. C:/windows/system32/drivers/etc/hosts

      127.0.0.1 nextwebapp.me

    Note: If the browser is already opened when doing this, the error will keep on showing. So, please close the browser and start again. Better yet, go incognito or start a new session for immediate effect.

提交回复
热议问题