feat: Improve configuration loading robustness, add Vercel-specific fallbacks, and update documentation for config.json best practices.

This commit is contained in:
CJACK
2026-02-18 00:38:38 +08:00
parent f62fa22338
commit 89e93a1674
9 changed files with 370 additions and 31 deletions

View File

@@ -52,6 +52,9 @@ DS2API_ADMIN_KEY=admin
# Option C: Base64 encoded JSON (recommended for Vercel env var)
# DS2API_CONFIG_JSON=eyJrZXlzIjpbInlvdXItYXBpLWtleSJdLCJhY2NvdW50cyI6W3siZW1haWwiOiJ1c2VyQGV4YW1wbGUuY29tIiwicGFzc3dvcmQiOiJ4eHgiLCJ0b2tlbiI6IiJ9XX0=
#
# Generate from local config.json:
# DS2API_CONFIG_JSON="$(base64 < config.json | tr -d '\n')"
# ---------------------------------------------------------------
# Paths (optional)