更新 README.md 中阿里云 ESA 配置指南,优化缓存设置说明;修复 main.go 中流式传输的错误处理逻辑

This commit is contained in:
2026-01-20 14:20:35 +08:00
parent fe2202fe99
commit 92f1947a22
2 changed files with 5 additions and 5 deletions

View File

@@ -317,8 +317,8 @@ func init() {
res.Header.Set("Pragma", "no-cache")
res.Header.Set("Expires", "0")
// 针对流式传输的额外强化
if strings.Contains(res.Header.Get("Content-Type"), "event-stream") {
return nil
}
// Optional: Custom error handler
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {