Chrome会禁用网站的SSL检查吗?

use*_*989 21 ssl google-chrome

我收到此警告以访问非https网站为https

在此输入图像描述

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

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

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

Enr*_*cio 25

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

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

您应该将它用于测试目的.更完整的选项列表如下:http://peter.sh/experiments/chromium-command-line-switches/

  • 在Chrome版本53.0.2785.116中无效 (12认同)
  • 如果您还添加: `--user-data-dir="%TEMP%"` (或任何其他目录),则无需关闭其他 chrome 实例即可使其工作。 (5认同)
  • 作品!但是请在运行之前检查所有镶边窗口/选项卡是否关闭!...否则将无法正常工作 (2认同)

sam*_*y34 7

在我的情况下,我正在开发一个ASP.Net MVC5 Web应用程序,一旦我开始与服务工作者合作,我的本地开发机器(IISExpress证书)上的证书错误就开始成为一个实际问题.由于证书错误,Chrome根本不会注册我的服务工作者.

但是,我注意到在我的自动化Selenium浏览器测试期间,Chrome似乎只是"忽略"所有这些类型的问题(例如关于不安全网站的警告页面),所以我问自己一个问题:Selenium是如何启动Chrome的运行它的测试,它是否也可以解决服务工作者的问题?

在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:,
Run Code Online (Sandbox Code Playgroud)

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

唯一确实有所作为的是--user-data-dir参数,可以将生产工作设置为不存在的目录(如果不提供参数,则无法正常工作) .

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


小智 6

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

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --ignore-urlfetcher-cert-requests &> /dev/null
Run Code Online (Sandbox Code Playgroud)

请注意,这还将使Google Chrome浏览器在网址栏中将所有HTTPS网站标记为不安全。