From b7e8a49e4da53d2b28ecd4f5ecceec80eccc2d0f Mon Sep 17 00:00:00 2001 From: TinsFox Date: Tue, 2 Apr 2024 15:53:17 +0800 Subject: [PATCH] chore: env --- apps/remix/.env.example | 4 +++- apps/remix/app/routes/_h._index.tsx | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) 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({