From bf99b542eafa4286d65d988560b51f418c2dbf2d Mon Sep 17 00:00:00 2001 From: yesmore <3224266014@qq.com> Date: Fri, 5 Apr 2024 15:12:06 +0800 Subject: [PATCH] upd --- apps/remix/app/routes/_h._index.tsx | 52 ++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/apps/remix/app/routes/_h._index.tsx b/apps/remix/app/routes/_h._index.tsx index e8a6481..93526df 100644 --- a/apps/remix/app/routes/_h._index.tsx +++ b/apps/remix/app/routes/_h._index.tsx @@ -83,32 +83,32 @@ export const action: ActionFunction = async ({ request }) => { }); } } else if (_action === "create") { - const response = (await request.formData()).get("cf-turnstile-response"); - if (!response) { - return { - error: "No captcha response", - }; - } - const verifyEndpoint = - "https://challenges.cloudflare.com/turnstile/v0/siteverify"; - const secret = - process.env.TURNSTILE_SECRET || "1x0000000000000000000000000000000AA"; - const resp = await fetch(verifyEndpoint, { - method: "POST", - body: JSON.stringify({ - secret, - response, - }), - headers: { - "Content-Type": "application/json", - }, - }); - const data = await resp.json(); - if (!data.success) { - return { - error: "Failed to verify captcha", - }; - } + // const response = (await request.formData()).get("cf-turnstile-response"); + // if (!response) { + // return { + // error: "No captcha response", + // }; + // } + // const verifyEndpoint = + // "https://challenges.cloudflare.com/turnstile/v0/siteverify"; + // const secret = + // process.env.TURNSTILE_SECRET || "1x0000000000000000000000000000000AA"; + // const resp = await fetch(verifyEndpoint, { + // method: "POST", + // body: JSON.stringify({ + // secret, + // response, + // }), + // headers: { + // "Content-Type": "application/json", + // }, + // }); + // const data = await resp.json(); + // if (!data.success) { + // return { + // error: "Failed to verify captcha", + // }; + // } const domain = process.env.EMAIL_DOMAIN || ""; if (!domain) {