Files
eSIM-Tools/env.example
Abner 05318df88a feat: 为 Turnstile 验证添加强制执行控制功能
- 新增 TURNSTILE_ENFORCE 环境变量,可在紧急情况下跳过 BFF Turnstile 验证
- 在 CLAUDE.md 和 env.example 中添加完整的 Turnstile 配置说明
- 修改 BFF 代理逻辑,仅在启用强制执行时进行 Turnstile 验证
- 优化前端 JavaScript 代码,移除冗余的验证状态变量
- 在跳过验证时输出警告日志,便于调试和监控
2025-11-24 17:38:12 +08:00

34 lines
961 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# eSIM工具环境配置
# 服务器配置
NODE_ENV=development
PORT=3000
# API配置
GIFFGAFF_API_BASE=https://id.giffgaff.com
GIFFGAFF_PUBLIC_API_BASE=https://publicapi.giffgaff.com
SIMYO_API_BASE=https://appapi.simyo.nl
# 日志配置
LOG_LEVEL=info
# CORS配置
# 通用允许来源(本地 server.js 使用Netlify Functions 使用 ALLOWED_ORIGIN 环境变量
CORS_ORIGIN=*
ALLOWED_ORIGIN=https://esim.cosr.eu.org
# Cloudflare Turnstile 配置
TURNSTILE_SITE_KEY=
TURNSTILE_SECRET_KEY=
# 设为 false 可在紧急情况下跳过 BFF Turnstile 校验(默认 true
TURNSTILE_ENFORCE=true
# 受保护函数访问密钥(要求调用方在 Header x-esim-key 或 body.authKey / ?authKey 携带匹配值)
# ⚠️ 必填Server 与 Functions/BFF 共享的访问密钥
# 🔐 生成强随机密钥: openssl rand -hex 32
# ❌ 禁止使用默认值或简单密码
ACCESS_KEY=
# 可选自定义API超时时间毫秒
API_TIMEOUT=30000