diff --git a/cmd/cloudx/proxy/helpers.go b/cmd/cloudx/proxy/helpers.go index 79e4824f..f604be6b 100644 --- a/cmd/cloudx/proxy/helpers.go +++ b/cmd/cloudx/proxy/helpers.go @@ -239,6 +239,12 @@ func runReverseProxy(ctx context.Context, h *client.CommandHelper, stdErr io.Wri server := graceful.WithDefaults(&http.Server{ Addr: addr, Handler: ch.Handler(mw), + // graceful.WithDefaults would otherwise apply a 5s read and 10s write + // timeout, which cut slower exchanges off mid-flight and leave the client + // with an empty reply. The upstream here is the developer's own + // application and may legitimately take longer than that. + ReadTimeout: 120 * time.Second, + WriteTimeout: 120 * time.Second, }) if conf.isTunnel {