You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chrome新版本(119.0.6045.124)localhost不安全SSL证书设置问题求助

解决Chrome新版本忽略localhost无效SSL证书的办法

方法1:通过命令行参数启动Chrome

直接用命令行指定参数,强制Chrome跳过localhost的SSL证书验证:

  • Windows:打开命令提示符,执行:
    chrome.exe --allow-insecure-localhost
    
  • macOS:打开终端,执行:
    /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-insecure-localhost
    
  • Linux:根据Chrome安装路径,执行类似命令:
    google-chrome --allow-insecure-localhost
    

如果上述参数无效,可精准指定证书公钥哈希:

  1. 访问localhost不安全页面,点击地址栏「不安全」→「证书」→「详细信息」,复制SHA-256格式的「公钥哈希」
  2. 将哈希值加入参数启动:
    chrome.exe --ignore-certificate-errors-spki-list=<你的公钥哈希值>
    

方法2:将localhost证书导入系统信任存储

把本地生成的SSL证书添加到系统信任列表,从根源解决验证问题:

  1. 访问localhost时,点击地址栏「不安全」→「证书」→「详细信息」→「复制到文件」,按向导导出DER格式的证书文件
  2. 导入证书:
    • Windows:搜索「管理计算机证书」,进入「受信任的根证书颁发机构」→「证书」,右键选择「所有任务」→「导入」,完成证书导入
    • macOS:打开「钥匙串访问」,将证书拖入「系统」钥匙串,双击证书后在「信任」选项卡设置「使用此证书时」为「始终信任」
    • Linux:将证书复制到/usr/local/share/ca-certificates/目录,执行sudo update-ca-certificates更新证书列表

方法3:添加Chrome不安全内容例外

通过Chrome内置设置,单独允许localhost的不安全内容:

  1. 打开Chrome设置,搜索「不安全内容」
  2. 在「允许显示不安全内容」选项下,点击「添加」,输入https://localhost(或带端口的具体地址如https://localhost:3000),保存设置即可

内容的提问来源于stack exchange,提问作者davi.de

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 14:32:03