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: Where the Widget should live, it looks like this: 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?
答案 0 :(得分:1)
我花了几天的时间和CSP一起玩,但事实证明其中一个样式表正在禁用iframe。
我在我的代码中找到了这个,不再使用了。
iframe {
height:0px;
display:none;
}
虽然代码会写入框架并下载正确的Javascript,但因为没有显示的iFrame,所以没有Captcha写入的位置。