Commit e95e08c6 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Handle shutdown in /_health

parent 39254fa6
Pipeline #20299 passed with stage
in 30 seconds
......@@ -523,8 +523,13 @@ func (p *ProxyServer) mergeCertificateFiles(name string, certificatePath string,
}
func (p *ProxyServer) handleHealth(writer http.ResponseWriter, request *http.Request) {
writer.WriteHeader(http.StatusOK)
writer.Write([]byte("ok"))
if p.shutdown {
writer.WriteHeader(http.StatusServiceUnavailable)
writer.Write([]byte("shutdown"))
} else {
writer.WriteHeader(http.StatusOK)
writer.Write([]byte("ok"))
}
}
func (p *ProxyServer) runUtilsServer() error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment