feat: enforce api production safety limits

This commit is contained in:
Codex
2026-06-28 21:20:38 +08:00
parent a8e0ac78be
commit 1d873b2e50
8 changed files with 177 additions and 14 deletions

View File

@@ -57,6 +57,7 @@ Supabase 官方允许前端用 Data API 访问数据,但前提是 RLS、最小
- 普通 JSON API 必须有默认上限。
- 导入接口可以有更大上限,但必须可配置且有最大值。
- 超限返回 413。
- 当前默认:`MAX_JSON_BODY_BYTES=1048576``MAX_IMPORT_JSON_BODY_BYTES=10485760`,硬上限 50MB。
6. 租户密钥保护
- 商户密钥、短信 secret、OAuth secret 不允许明文长期存储。