doc/integration/recaptcha.md
{{< details >}}
{{< /details >}}
GitLab leverages reCAPTCHA to protect against spam and abuse. GitLab displays the CAPTCHA form on the new user account page to confirm that a real user, not a bot, is attempting to create an account.
To use reCAPTCHA, first create a site and private key.
recaptcha_html:
app/services/spam/spam_verdict_service.rb.#execute method to return CONDITIONAL_ALLOW.[!note] Make sure you are viewing an issuable in a project that is public. If you're working with an issue, the issue is public.
You can enable reCAPTCHA for user logins via password in the user interface
or by setting the X-GitLab-Show-Login-Captcha HTTP header.
For example, in NGINX, this can be done via the proxy_set_header
configuration variable:
proxy_set_header X-GitLab-Show-Login-Captcha 1;
For Linux package instances, configure in /etc/gitlab/gitlab.rb:
nginx['proxy_set_headers'] = { 'X-GitLab-Show-Login-Captcha' => '1' }