mirror of
https://github.com/Silentely/eSIM-Tools.git
synced 2026-09-03 14:30:18 +08:00
- 新增 TURNSTILE_ENFORCE 环境变量,可在紧急情况下跳过 BFF Turnstile 验证 - 在 CLAUDE.md 和 env.example 中添加完整的 Turnstile 配置说明 - 修改 BFF 代理逻辑,仅在启用强制执行时进行 Turnstile 验证 - 优化前端 JavaScript 代码,移除冗余的验证状态变量 - 在跳过验证时输出警告日志,便于调试和监控
34 lines
961 B
Plaintext
34 lines
961 B
Plaintext
# 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
|