Getting Chrome to accept self-signed localhost certificate

后端 未结 30 2959
小蘑菇
小蘑菇 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 11:50

    For a test environment

    You can use --ignore-certificate-errors as a command line parameter when launching chrome (Working on Version 28.0.1500.52 on Ubuntu).

    This will cause it to ignore the errors and connect without warning. If you already have a version of chrome running, you will need to close this before relaunching from the command line or it will open a new window but ignore the parameters.

    I configure Intellij to launch chrome this way when doing debugging, as the test servers never have valid certificates.

    I wouldn't recommend normal browsing like this though, as certificate checks are an important security feature, but this may be helpful to some.

提交回复
热议问题