Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
56 lines (48 loc) · 2.16 KB
/
Copy path.env.example
File metadata and controls
56 lines (48 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
SAPI_PORT=3000
SAPI_ADMIN_USER=admin
SAPI_ADMIN_PASSWORD=change-this-password
SAPI_PUBLIC_BASE_URL=http://localhost:3000
SAPI_DATA_FILE=
# Optional Redis fallback controls for high-traffic rate limits and brute-force protection.
# Leave empty to use local in-memory limiters.
SAPI_REDIS_URL=
SAPI_REDIS_POOL_SIZE=64
SAPI_REDIS_KEY_PREFIX=sapi
# Optional PostgreSQL backend for shared state and high-volume request logs.
# Leave empty to keep using data/sapi.json.
SAPI_POSTGRES_URL=
SAPI_POSTGRES_MAX_CONNS=20
# Request guardrails. Proxy endpoints usually need a larger body limit than admin/auth APIs.
SAPI_REQUEST_BODY_LIMIT_BYTES=1048576
SAPI_PROXY_BODY_LIMIT_BYTES=33554432
# Proxy client IP handling. Keep disabled unless SAPI runs behind trusted proxies.
SAPI_TRUST_PROXY_HEADERS=false
SAPI_TRUSTED_PROXY_CIDRS=
# Tencent Cloud Captcha (腾讯云验证码) — deprecated, use Turnstile instead
SAPI_TENCENT_CAPTCHA_APP_ID=
SAPI_TENCENT_CAPTCHA_APP_SECRET_KEY=
# 腾讯云账号 API 密钥(Captcha 2.0 票据校验必须用 API 3.0 签名)
# 获取方式:腾讯云控制台 -> 访问管理 -> API 密钥管理 -> 新建密钥
SAPI_TENCENT_SECRET_ID=your-tencent-secret-id
SAPI_TENCENT_SECRET_KEY=your-tencent-secret-key
# Cloudflare Turnstile (验证码 — 登录、注册、发送验证码时使用)
# 获取方式:Cloudflare 控制台 -> Turnstile -> 添加站点
SAPI_TURNSTILE_SITE_KEY=0x...
SAPI_TURNSTILE_SECRET_KEY=0x...
# Set true to skip Turnstile only for /api/admin/login; user auth still requires Turnstile.
SAPI_ADMIN_TURNSTILE_DISABLED=false
# GitHub OAuth login. Callback defaults to SAPI_PUBLIC_BASE_URL + /api/auth/github/callback.
SAPI_GITHUB_CLIENT_ID=
SAPI_GITHUB_CLIENT_SECRET=
SAPI_GITHUB_REDIRECT_URL=
SAPI_GITHUB_REQUIRED_FOLLOW_TARGET=
# Optional per-host IP override for backend GitHub requests when local DNS routes to unreachable GitHub IPs.
# Example: github.com=140.82.113.3,api.github.com=140.82.114.5
SAPI_GITHUB_HOST_RESOLVE=
# SMTP Configuration for sending invitation emails
SAPI_SMTP_HOST=smtp.example.com
SAPI_SMTP_PORT=587
SAPI_SMTP_SECURE=false
SAPI_SMTP_USER=your-email@example.com
SAPI_SMTP_PASS=your-email-password
SAPI_SMTP_FROM=noreply@example.com