No Captcha Recaptcha is Not Displaying

时间:2015-05-12 23:45:01

标签: recaptcha

I'm upgrading to the NoCaptcha reCaptcha as described on Google's Documentation.

I'm using the Automatic Render method.

std::unique_ptr<Pet> my_pet(new Pet(0, "Henry"));`

However, it displays like this: Post Render Widget Where the Widget should live, it looks like this: Space where Widget should be It successfully pings https://www.google.com/recaptcha/api.js and downloads recaptcha__en.js. If I use the deferred render from the example, it gets the same result. There are no errors reported in the console and no errors in the network responses.

The iFrame does have code generated in it, it just doesn't display. How can I make the widget display properly?

1 个答案:

答案 0 :(得分:1)

我花了几天的时间和CSP一起玩,但事实证明其中一个样式表正在禁用iframe。

我在我的代码中找到了这个,不再使用了。

iframe {
    height:0px;
    display:none;
}

虽然代码会写入框架并下载正确的Javascript,但因为没有显示的iFrame,所以没有Captcha写入的位置。