This commit is contained in:
WJQSERVER 2025-01-21 15:04:22 +08:00
parent 33b1682c7e
commit ac6b641995

View file

@ -34,6 +34,10 @@ func ChunkedProxyRequest(c *gin.Context, u string, cfg *config.Config, mode stri
return return
} }
setRequestHeaders(c, headReq) setRequestHeaders(c, headReq)
// 删除Conection Upgrade头, 避免与HTTP/2冲突(检查是否存在Upgrade头)
if headReq.Header.Get("Connection") == "Upgrade" {
headReq.Header.Del("Connection")
}
AuthPassThrough(c, cfg, headReq) AuthPassThrough(c, cfg, headReq)
headResp, err := client.Do(headReq) headResp, err := client.Do(headReq)