Revert "root: handle liveness probe in router (also keep internal one)"

This reverts commit dd7cb45733.
This commit is contained in:
Jens Langhammer 2021-10-12 18:44:08 +02:00
parent dd7cb45733
commit 57e86582d1
1 changed files with 3 additions and 0 deletions

View File

@ -39,6 +39,9 @@ func (ws *WebServer) configureProxy() {
}
ws.proxyErrorHandler(rw, r, fmt.Errorf("proxy not running"))
})
ws.m.Path("/-/health/live/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
rw.WriteHeader(204)
})
ws.m.PathPrefix("/").HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
if !ws.p.IsRunning() {
ws.proxyErrorHandler(rw, r, fmt.Errorf("authentik core not running yet"))