feat: Add Vercel deployment protection bypass support, enhance related error handling, and update documentation.

This commit is contained in:
CJACK
2026-02-16 22:06:41 +08:00
parent d70a0acaa8
commit eb470c33ba
4 changed files with 56 additions and 1 deletions

View File

@@ -150,6 +150,12 @@ No Output Directory named "public" found after the Build completed.
若你在项目设置里手动改过 Output Directory请同步改为 `static` 或清空让仓库配置生效。
若接口返回 Vercel 的 HTML 页面 `Authentication Required`(而不是 JSON说明被 Vercel Deployment Protection 拦截:
- 关闭该部署/环境的 Protection推荐用于公开 API
- 或给请求加 `x-vercel-protection-bypass`
- 若仅是 Vercel 内部 Node->Go 调用被拦截,可设置 `VERCEL_AUTOMATION_BYPASS_SECRET`(或 `DS2API_VERCEL_PROTECTION_BYPASS`
Vercel 流式说明(重要):
- Vercel 的 Go Runtime 存在平台层响应缓冲,因此本项目在 Vercel 上采用“Go prepare + Node stream”的混合链路来恢复实时 SSE。