django-recaptcha3 icon indicating copy to clipboard operation
django-recaptcha3 copied to clipboard

please support RECAPTCHA_PROXY

Open ghost opened this issue 5 years ago • 5 comments

If you require a proxy, add a RECAPTCHA_PROXY setting, for example:

RECAPTCHA_PROXY = 'http://127.0.0.1:8000'

ghost avatar Dec 29 '18 12:12 ghost

Just a question, why you want to use a proxy only for recaptcha requests?

You can always set the proxy when you run your Django app with environment vars:

$ export HTTP_PROXY="http://localhost:8000"
$ export HTTPS_PROXY="https://localhost:8443"

This is only an example of course!

kbytesys avatar Jan 19 '19 14:01 kbytesys

@kbytesys thank you very much

in china , we can not access *.google.com , but www.recaptcha.net

ghost avatar Jan 21 '19 08:01 ghost

You don't need a proxy, because you need to change the url used by frontend and backend only. For the frontend I've added a configuration key, but I think that it's useful to add this feature also for the server requests.

kbytesys avatar Jan 21 '19 09:01 kbytesys

Reopened because I'm adding the proxy support also on the backend

kbytesys avatar Jan 22 '19 11:01 kbytesys

Link to Google's documentation https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally

Can I use reCAPTCHA globally? Yes, please use "www.recaptcha.net" in your code in circumstances when "www.google.com" is not accessible.

First, replace with

After that, apply the same to everywhere else that uses "www.google.com/recaptcha/" on your site.

Presumably for web hosting in CN the server side verification URL might need to be changed too?

shuckc avatar Jan 25 '21 14:01 shuckc