mirror of
https://github.com/handsomezhuzhu/api-proxy.git
synced 2026-02-20 11:50:15 +00:00
更新 README.md 中阿里云 ESA 配置指南,优化缓存设置说明;修复 main.go 中流式传输的错误处理逻辑
This commit is contained in:
4
main.go
4
main.go
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user