google / recaptcha

PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.
http://www.google.com/recaptcha/
BSD 3-Clause "New" or "Revised" License
3.48k stars 775 forks source link

Appropriate way/configuration to use recaptcha.net instead of google.com with this library #495

Open mpodvinec opened 2 years ago

mpodvinec commented 2 years ago

Issue description As described in https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally , the recommended way of making ReCAPTCHA accessible for Chinese users is to replace all calls to google.com to point to recaptcha.net instead.

I realize this may be a long-solved issue for some, but I could not find good documentation on how to best achieve this. On the javascript side, this is trivial. However, the PHP library here also includes a call to the siteverify API that is hard-coded as a constant in the library to point to google.com .

While we could make a local, modified copy of the library, I feel that this is not the right and re-usable way to go about this. But I am unsure how to achieve this best. So it's maybe less a bug report and more of a question?

Environment

tabarnouche commented 9 months ago

If I'm not misunderstanding, recaptcha.net is just a bypass so it should be fine as far as your frontend can post the g-recaptcha-response to your backend.