且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法加载资源:net::ERR_INSECURE_RESPONSE

更新时间:2022-03-19 23:26:38

您的资源可能使用基于 HTTPS 协议的自签名 SSL 证书.Chromium,因此 Google Chrome 默认阻止这种被认为不安全的资源.

Your resource probably use a self-signed SSL certificate over HTTPS protocol. Chromium, so Google Chrome block by default this kind of resource considered unsecure.

你可以这样绕过:

  • 假设框架的 URL 是 https://www.domain.com,在 chrome 中打开一个新标签并转到 https://www.domain.com.
  • Chrome 会要求您接受 SSL 证书.接受它.
  • 然后,如果您使用框架重新加载页面,您可以看到它现在可以工作了
  • Assuming your frame's URL is https://www.domain.com, open a new tab in chrome and go to https://www.domain.com.
  • Chrome will ask you to accept the SSL certificate. Accept it.
  • Then, if you reload your page with your frame, you could see that now it works

您可能猜到的问题是,您网站的每个访问者都必须执行此任务才能访问您的框架.

The problem as you can guess, is that each visitor of your website has to do this task to access your frame.

您会注意到 chrome 会在每个导航会话中阻止您的 URL,而 chrome 可以永远记住您信任该域.

You can notice that chrome will block your URL for each navigation session, while chrome can memorise for ever that you trust this domain.

如果你的frame可以通过HTTP而不是HTTPS访问,我建议你使用它,这样问题就解决了.

If your frame can be accessed by HTTP rather than HTTPS, I suggest you to use it, so this problem will be solved.