feat(http): Add health check endpoint
Add /_/healthz endpoint that returns 200 OK for service health monitoring.
This commit is contained in:
@@ -19,6 +19,11 @@ type Config struct {
|
||||
func main() {
|
||||
config := loadConfig()
|
||||
|
||||
http.HandleFunc("/_/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write([]byte("OK"))
|
||||
})
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
proxyHandler(w, r, config)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user