Uncaught SecurityError: Blocked a frame with origi

2019-07-13 09:00发布

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.

2条回答
再贱就再见
2楼-- · 2019-07-13 09:49

Change the recaptcha library URL from https to http

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

查看更多
虎瘦雄心在
3楼-- · 2019-07-13 09:56

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

查看更多
登录 后发表回答