Fix upstream timeout for large downloads
Some checks failed
docker-release / build-and-push (push) Failing after 25m53s

This commit is contained in:
2025-12-12 17:36:37 +08:00
parent 3685b2129a
commit 9a57949147
3 changed files with 12 additions and 5 deletions

View File

@@ -31,9 +31,12 @@ func NewUpstreamClient(cfg *config.Config) *http.Client {
timeout = cfg.Global.UpstreamTimeout.DurationValue()
}
transport := defaultTransport.Clone()
// Use UpstreamTimeout as ResponseHeaderTimeout to avoid killing long streaming downloads.
transport.ResponseHeaderTimeout = timeout
return &http.Client{
Timeout: timeout,
Transport: defaultTransport.Clone(),
Transport: transport,
}
}