【问题标题】:Chrome disable SSL checking for sites? [closed]Chrome 禁用网站的 SSL 检查? [关闭]
【发布时间】:2014-12-10 21:01:13
【问题描述】:

我在以 https 身份访问非 https 站点时收到此警告

尝试通过将该命令添加到快捷方式目标来禁用它,但它不起作用。

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”-ignore-urlfetcher-cert-requests

是否有任何可能的方法来禁用网站的 ssl 检查?

【问题讨论】:

标签: google-chrome ssl


【解决方案1】:

要禁用与证书相关的错误窗口,您可以从控制台启动 Chrome 并使用此选项:--ignore-certificate-errors

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --ignore-certificate-errors

您应该将其用于测试目的。更完整的选项列表在这里:http://peter.sh/experiments/chromium-command-line-switches/

【讨论】:

  • 在 OSX 中启动 Chrome 的链接:stackoverflow.com/questions/13146125/…
  • 在 Chrome 版本 53.0.2785.116 中没有帮助
  • 有效!但是在运行之前,请检查您所有的 chrome 窗口/选项卡是否已关闭! ...否则它将无法正常工作
  • 如果您还添加:--user-data-dir="%TEMP%"(或任何其他目录),则无需关闭其他 chrome 实例即可使其工作。
  • 我在 MacOS Catalina 10.15.7 (19H15) 和 Chrome 版本 86.0.4240.183(官方版本)(x86_64) 上得到 NET::ERR_CERT_INVALID。上述解决方案没有帮助。
【解决方案2】:

Mac 用户请从终端执行以下命令以禁用证书警告。

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --ignore-urlfetcher-cert-requests &> /dev/null

请注意,这也会让谷歌浏览器在 URL 栏中将所有 HTTPS 站点标记为不安全。

【讨论】:

  • 这行得通,但你的答案中没有转义空格使用这个/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors
  • 这应该是open -a Google\ Chrome --args --ignore-certificate-errors --ignore-urlfetcher-cert-requests
  • 谢谢! --ignore-certificate-errors --ignore-urlfetcher-cert-requests 似乎也在 Ubuntu 上工作。
  • 这些错误的存在是有原因的......在全球范围内禁用它们似乎是一个非常糟糕的主意......
  • 在 Windows 10 20H2 上使用 Chrome 92。尽管 Chrome 警告“这是个坏主意”,但仍可以显示损坏的 HTTPS 站点。
【解决方案3】:

在我的例子中,我正在开发一个 ASP.Net MVC5 Web 应用程序,当我开始使用 service workers 时,我的本地开发机器上的证书错误(IISExpress 证书)开始成为一个实际问题。由于证书错误,Chrome 根本不会注册我的 Service Worker。

然而,我确实注意到,在我的 Selenium 浏览器自动化测试期间,Chrome 似乎只是“忽略”了所有这些类型的问题(例如关于不安全站点的警告页面),所以我问自己这个问题: Selenium 是如何启动 Chrome 来运行它的测试的,它是否还能解决 service worker 的问题?

在 Windows 上使用 Process Explorer,我能够找出 Selenium 用于启动 Chrome 的命令行参数:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12207 --safebrowsing-disable-auto-update --test-type=webdriver --use-mock-keychain --user-data-dir="C:\Users\Sam\AppData\Local\Temp\some-non-existent-directory" data:,

这里有一堆参数我最终没有进行必要性测试,但如果我以这种方式运行 Chrome,我的服务工作者会注册并按预期工作。

唯一似乎有所不同的是 --user-data-dir 参数,可以将其设置为不存在的目录(事情不会如果您不提供参数,则工作)。

希望能帮助遇到类似问题的其他人。我正在使用 Chrome 60.0.3112.90。

【讨论】:

  • 似乎--ignore-certificate-errors 标志也可能是相关的。
猜你喜欢
  • 2012-11-01
  • 2012-06-07
  • 2017-05-18
  • 2013-08-22
  • 2014-08-27
  • 2016-08-25
  • 1970-01-01
  • 2012-08-26
  • 1970-01-01
相关资源
最近更新 更多