fix(gateway): fixed http gateway context propagation error (#4634)

This commit is contained in:
#Suyghur
2025-02-08 17:50:26 +08:00
committed by GitHub
parent 24073969a1
commit e6b4372056

View File

@@ -190,6 +190,8 @@ func (s *Server) buildHttpHandler(target *HttpClientConf) http.HandlerFunc {
ctx, cancel := context.WithTimeout(r.Context(), timeout)
defer cancel()
req = req.WithContext(ctx)
} else {
req = req.WithContext(r.Context())
}
resp, err := httpc.DoRequest(req)