Skip to content

using reCAPTCHA globally #6818

Closed
Closed
@BillSJC

Description

@BillSJC
  • Gitea version (or commit ref): 1.8.0
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Thanks for the support of the reCAPTCHA, and i found its config here.

However, here is the problem that some region cannot access google domain google.com(such as China),so the reCAPTCHA cannot be used in these region. Currently I can only disable reCAPTCHA to make the website available for registration.

The official solution is replace www.google.com to www.recaptcha.net (see as recaptcha offical doc can-i-use-recaptcha-globally)

here are the doc

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.

Possible solution

Maybe a line can be added to the configuration file, such as

;Use www.google.com as default domain
;In some region which cannot access google.com, using www.recaptcha.net to get access
RECAPTCHA_DOMAIN = www.google.com

If u need replace the domain, just change it

;Use www.google.com as default domain
;In some region which cannot access google.com, using www.recaptcha.net to get access
RECAPTCHA_DOMAIN = www.recaptcha.net

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions