diff --git a/cmd/gate/app-healthy.go b/cmd/gate/app-healthy.go index d5f3b24b..576fe4db 100644 --- a/cmd/gate/app-healthy.go +++ b/cmd/gate/app-healthy.go @@ -12,8 +12,9 @@ type Healthy interface { } const ( - healthyState = "NeoFS S3 Gateway is " - // defaultContentType = "text/plain; charset=utf-8" + healthyState = "NeoFS S3 Gateway is " + hdrContentType = "Content-Type" + defaultContentType = "text/plain; charset=utf-8" ) func attachHealthy(r *mux.Router, h Healthy) { @@ -22,6 +23,7 @@ func attachHealthy(r *mux.Router, h Healthy) { StrictSlash(true) healthy.HandleFunc("/ready", func(w http.ResponseWriter, r *http.Request) { + w.Header().Set(hdrContentType, defaultContentType) w.WriteHeader(http.StatusOK) _, _ = fmt.Fprintln(w, healthyState+"ready") }) @@ -35,6 +37,7 @@ func attachHealthy(r *mux.Router, h Healthy) { code = http.StatusBadRequest } + w.Header().Set(hdrContentType, defaultContentType) w.WriteHeader(code) _, _ = fmt.Fprintln(w, healthyState+msg) }) diff --git a/legacy/neofs-router.go b/legacy/neofs-router.go index 44cf08bb..7561ea09 100644 --- a/legacy/neofs-router.go +++ b/legacy/neofs-router.go @@ -41,9 +41,6 @@ func AttachS3API(r *mux.Router, obj ObjectLayer, l *zap.Logger) { globalServerConfigMu.Unlock() } - // Add healthcheck router - registerHealthCheckRouter(r) - // Add API router. registerAPIRouter(r, true, true)