in internal/httphandler/httphandler.go [44:61]
func New(opts *Options) *Handler {
s := &Handler{
Options: *opts,
}
mux := http.NewServeMux()
mux.HandleFunc("/", s.StaticHandler())
// TODO: clean up after PR#138 is merged and tested https://github.com/GoogleCloudPlatform/gcping/pull/138
mux.HandleFunc("/api/endpoints", s.HandleEndpoints)
mux.HandleFunc("/api/ping", s.HandlePing)
// Serve /ping with region response to fix issue#96 on older cli versions.
mux.HandleFunc("/ping", s.HandlePing)
s.handler = mux
return s
}