feat(recaptcha): change recaptcha endpoint

This commit is contained in:
shingyu
2026-03-15 18:18:14 +08:00
parent 784acfe4e1
commit 879b096164
2 changed files with 2 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ use thiserror::Error;
use crate::BoundActivityTracker; use crate::BoundActivityTracker;
// https://developers.google.com/recaptcha/docs/verify#api_request // https://developers.google.com/recaptcha/docs/verify#api_request
const RECAPTCHA_VERIFY_URL: &str = "https://www.google.com/recaptcha/api/siteverify"; const RECAPTCHA_VERIFY_URL: &str = "https://www.recaptcha.net/recaptcha/api/siteverify";
// https://docs.hcaptcha.com/#verify-the-user-response-server-side // https://docs.hcaptcha.com/#verify-the-user-response-server-side
const HCAPTCHA_VERIFY_URL: &str = "https://api.hcaptcha.com/siteverify"; const HCAPTCHA_VERIFY_URL: &str = "https://api.hcaptcha.com/siteverify";

View File

@@ -29,7 +29,7 @@ Please see LICENSE files in the repository root for full details.
{% macro head() -%} {% macro head() -%}
{%- if captcha|default(False) -%} {%- if captcha|default(False) -%}
{%- if captcha.service == "recaptcha_v2" -%} {%- if captcha.service == "recaptcha_v2" -%}
<script src="https://www.google.com/recaptcha/api.js" async defer></script> <script src="https://www.recaptcha.net/recaptcha/api.js" async defer></script>
{%- elif captcha.service == "cloudflare_turnstile" -%} {%- elif captcha.service == "cloudflare_turnstile" -%}
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script> <script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
{%- elif captcha.service == "hcaptcha" -%} {%- elif captcha.service == "hcaptcha" -%}