Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please support RECAPTCHA_PROXY #6

Open
ghost opened this issue Dec 29, 2018 · 5 comments
Open

please support RECAPTCHA_PROXY #6

ghost opened this issue Dec 29, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Dec 29, 2018

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

RECAPTCHA_PROXY = 'http://127.0.0.1:8000'

@kbytesys kbytesys added the enhancement New feature or request label Jan 19, 2019
@kbytesys
Copy link
Owner

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!

@ghost
Copy link
Author

ghost commented Jan 21, 2019

@kbytesys thank you very much

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

@kbytesys
Copy link
Owner

kbytesys commented Jan 21, 2019

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.

@ghost ghost closed this as completed Jan 21, 2019
@kbytesys kbytesys reopened this Jan 22, 2019
@kbytesys
Copy link
Owner

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

@shuckc
Copy link
Contributor

shuckc commented Jan 25, 2021

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 <script src="https://www.google.com/recaptcha/api.js" async defer></script> with

<script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants