Uncaught SecurityError: Blocked a frame with origin “https://www.google.com” from accessing a frame with origin “http://my.site.com”.

大憨熊 提交于 2019-12-12 18:06:15

问题


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.


回答1:


Change the recaptcha library URL from https to http

Chrome and other modern browsers will avoid mix HTTP with HTTPS.




回答2:


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



来源:https://stackoverflow.com/questions/37458183/uncaught-securityerror-blocked-a-frame-with-origin-https-www-google-com-fro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!