chore: env

This commit is contained in:
TinsFox
2024-04-02 15:53:17 +08:00
parent b6fcc1a258
commit b7e8a49e4d
2 changed files with 7 additions and 5 deletions

View File

@@ -13,4 +13,6 @@ TURSO_DB_RO_AUTH_TOKEN=""
# turso 中获取, 连接数据库地址
TURSO_DB_URL=""
# 域名邮箱的域名
DOMAIN=""
DOMAIN=""
CLOUDFLARE_TURNSTILE_VERIFY_Endpoint="https://challenges.cloudflare.com/turnstile/v0/siteverify"

View File

@@ -113,10 +113,10 @@ export async function turnstileCheck(request: Request): Promise<boolean> {
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({