diff --git a/apps/remix/.env.example b/apps/remix/.env.example index aec82a6..2878be8 100644 --- a/apps/remix/.env.example +++ b/apps/remix/.env.example @@ -13,4 +13,6 @@ TURSO_DB_RO_AUTH_TOKEN="" # turso 中获取, 连接数据库地址 TURSO_DB_URL="" # 域名邮箱的域名 -DOMAIN="" \ No newline at end of file +DOMAIN="" + +CLOUDFLARE_TURNSTILE_VERIFY_Endpoint="https://challenges.cloudflare.com/turnstile/v0/siteverify" diff --git a/apps/remix/app/routes/_h._index.tsx b/apps/remix/app/routes/_h._index.tsx index 540d7f7..5947dfd 100644 --- a/apps/remix/app/routes/_h._index.tsx +++ b/apps/remix/app/routes/_h._index.tsx @@ -113,10 +113,10 @@ export async function turnstileCheck(request: Request): Promise { if (!response) { return false; } - const verifyEndpoint = - "https://challenges.cloudflare.com/turnstile/v0/siteverify"; - const secret = - process.env.TURNSTILE_SECRET || "1x0000000000000000000000000000000AA"; + const verifyEndpoint = process.env + .CLOUDFLARE_TURNSTILE_VERIFY_Endpoint as string; + + const secret = process.env.TURNSTILE_SECRET; const resp = await fetch(verifyEndpoint, { method: "POST", body: JSON.stringify({