diff --git a/pkg/proxy/remotehost.go b/pkg/proxy/remotehost.go index a931dd5..5367046 100644 --- a/pkg/proxy/remotehost.go +++ b/pkg/proxy/remotehost.go @@ -171,15 +171,14 @@ func (h *RemoteHost) Proxy(id uint64, w http.ResponseWriter, r *http.Request) (b } } w.Header().Set("X-Cart-Owner-Routed", "true") - if res.StatusCode >= 200 && res.StatusCode <= 299 { - w.WriteHeader(res.StatusCode) - _, copyErr := io.Copy(w, res.Body) - if copyErr != nil { - return true, copyErr - } - return true, nil + + w.WriteHeader(res.StatusCode) + _, copyErr := io.Copy(w, res.Body) + if copyErr != nil { + return true, copyErr } - return false, fmt.Errorf("proxy response status %d", res.StatusCode) + return true, nil + } func (r *RemoteHost) IsHealthy() bool {