开发者

rails recaptcha on localhost? windows causing issues?

I just checked out this a开发者_如何学Pythonnswer: Rails Recaptcha plugin always returns false

but it didn't seem to help. I'm trying to run recaptcha on rails on my local machine. The site says the API keys should work for prod and local. I've checked the keys many times and have even tried "workarounds" where you explicitly feed in the pub/priv key (since I'm running on windows). I just wanted to know if there's a known issue with windows, or if there's an issue with running on localhost, or if this plugin is out of date? Thanks.

I'm always getting the error that my captcha is wrong. I even tried the sound type, still wrong. Apologies if this is just a silly question, I just wanted to rule out everything that may be a known issue.


When getting an API key for ReCaptcha a domain must be specified. localhost won't work but your hostname should. As the recaptcha site says:

By default, your reCAPTCHA key is restricted to the specified domain, and any subdomains for additional security

Find out your hostname at the following link and use it as the domain for you API keys:

http://whatismyipaddress.com/staticpages/index.php/what-is-my-hostname

My provider happens to be Comcast, so I created a global API key for comcast.net

https://admin.recaptcha.net/recaptcha/createsite/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜