Make google Recaptcha work with special characters in the domain name

匿名 (未验证) 提交于 2019-12-03 01:38:01

问题:

) but it did not initialize the recaptcha.

Then trying an api key for the equivalent url http://xn--slja-loa.io which worked when reaching the site from http://xn--slja-loa.io but not .

Then I found the secure token which should work on all domains. It initialized the recaptchas on all domains and was also working on . https://developers.google.com/recaptcha/docs/secure_token

Edit

Since an api-key for http://xn--slja-loa.io is working from android when accessing the site from , it might be how the browser interprets the domain. Eg. firefox interprets as domain as http://xn--slja-loa.io as http://xn--slja-loa.io ?

Edit2

Edit3

回答1:

I tried it just now and I am able to generate key for 6Ld8VRETAAAAALRXFNxmjEeVzbg2y5vdWv7THwJz

will post a complete working example shortly


EDIT 1

Here's git repo for code and same running on heroku

(however when earlier i tried it created a key for too but on loading page at captcha it gives invalid domain, figured out that was original issue, i thought you were not able to generate key for this domain)

Will try for a complete fix


EDIT 2

Btw you can specify your domain ip too, check this discussion

For me heroku free account doesn't provides ip of domain so it's difficult for me to test it

Also i was reading this thread

Figured out if i specify domains list as just com it accepts. In your case, just specify se as domains and it should work , google doesn't checks out exact url it just checks domain

Hope it helps, Will look into stoken approach too



回答2:

you can read this post:

http://webdesign.tutsplus.com/tutorials/how-to-integrate-no-captcha-recaptcha-in-your-website--cms-23024

.....................



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