无法加载资源:net::ERR_INSECURE_RESPONSE [英] Failed to load resource: net::ERR_INSECURE_RESPONSE

查看:50
本文介绍了无法加载资源:net::ERR_INSECURE_RESPONSE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法欺骗服务器,这样我就不会收到这个错误:

IS there a way to trick the server so I don't get this error:

内容被阻止,因为它没有由有效的安全证书签名.

Content was blocked because it was not signed by a valid security certificate.

我正在将一个 html 网站的 iframe 拉入另一个网站,但我一直在这个问题的标题和 Internet Explorer 中收到控制台 (chrome) 错误,它说:

I'm pulling an iframe of an html website into another website but I keep getting the console (chrome) error in the title of this question and in internet explorer it says:

内容被阻止,因为它没有由有效的安全证书签名.

Content was blocked because it was not signed by a valid security certificate.

推荐答案

您的资源可能使用基于 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.

这篇关于无法加载资源:net::ERR_INSECURE_RESPONSE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆