的框架访问来源为

的框架访问来源为

本文介绍了未捕获的SecurityError:阻止了源于“https://www.google.com”的框架访问来源为“http://my.site.com”的框架。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是google reCaptcha v2.0,当我尝试使用示例html页面进行操作时,它在同一个域中工作,但是当我尝试与完整的生产页面集成时,同样的事情不起作用。点击reC​​aptcha复选框后,它会一直保持加载状态,之后会在下面详细介绍错误。

未捕获的SecurityError:阻止了一个框架来源https://www.google.com访问源自http://my.site.com的框架。请求访问的帧具有https的协议,正被访问的帧具有http的协议。协议必须匹配。



我尝试删除http,https并只保留//以便站点协议可以匹配但没有运气。
如果有人有解决方案,这将是一个很好的帮助。



预先感谢。

解决方案

当src在https上运行时,您的Web服务器必须启用SSL


I am using google reCaptcha v2.0 and this is working in the same domain when i am trying to do it with a sample html page but same thing is not working when I am trying to integrate with the full production page. After clicking on reCaptcha checkbox it's keep on loading for sometimes and after that it is throwing the error below in details.

Uncaught SecurityError: Blocked a frame with origin "https://www.google.com" from accessing a frame with origin "http://my.site.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.

I have tried removing http, https and just kept // so that site protocol can match but no luck.Would be a great help if anyone has a solution here.

Thanks in advance.

解决方案

When the src is running on https, your web server must be SSL enabled

这篇关于未捕获的SecurityError:阻止了源于“https://www.google.com”的框架访问来源为“http://my.site.com”的框架。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 23:38