mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
fix(idlewatcher): directly serve the request on ready instead of redirecting
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user