Remove /build endpoint (#4875)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-12-31 13:49:04 -03:00 committed by GitHub
parent f0f9618a89
commit 8db541e24b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,6 @@ limitations under the License.
package main
import (
"encoding/json"
"fmt"
"math/rand"
"net/http"
@ -139,7 +138,6 @@ func main() {
registerHealthz(nginx.HealthPath, ngx, mux)
registerMetrics(reg, mux)
registerHandlers(mux)
go startHTTPServer(conf.ListenPorts.Health, mux)
@ -253,14 +251,6 @@ func handleFatalInitError(err error) {
err)
}
func registerHandlers(mux *http.ServeMux) {
mux.HandleFunc("/build", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
b, _ := json.Marshal(version.String())
w.Write(b)
})
}
func registerHealthz(healthPath string, ic *controller.NGINXController, mux *http.ServeMux) {
// expose health check endpoint (/healthz)
healthz.InstallPathHandler(mux,