fix(idlewatcher): directly serve the request on ready instead of redirecting

This commit is contained in:
yusing
2025-12-17 11:46:52 +08:00
parent ea67095967
commit 21a23dd147

View File

@@ -181,10 +181,9 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN
ready := w.waitForReady(r.Context()) ready := w.waitForReady(r.Context())
if !ready { if !ready {
serveStaticContent(rw, http.StatusInternalServerError, "text/plain", []byte("Timeout waiting for container to become ready")) serveStaticContent(rw, http.StatusInternalServerError, "text/plain", []byte("Timeout waiting for container to become ready"))
} else { return false
http.Redirect(rw, r, r.URL.Path, http.StatusSeeOther)
} }
return false return true
} }
// Send a loading response to the client // Send a loading response to the client