diff --git a/command/agent/http.go b/command/agent/http.go index bbf071cbe0e..c7568fd6e2e 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -314,6 +314,7 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) { s.mux.HandleFunc("/v1/search", s.wrap(s.SearchRequest)) + s.mux.HandleFunc("/v1/operator/license", s.wrap(s.LicenseRequest)) s.mux.HandleFunc("/v1/operator/raft/", s.wrap(s.OperatorRequest)) s.mux.HandleFunc("/v1/operator/autopilot/configuration", s.wrap(s.OperatorAutopilotConfiguration)) s.mux.HandleFunc("/v1/operator/autopilot/health", s.wrap(s.OperatorServerHealth)) diff --git a/command/agent/http_oss.go b/command/agent/http_oss.go index e9081814150..863ab4bc27c 100644 --- a/command/agent/http_oss.go +++ b/command/agent/http_oss.go @@ -16,8 +16,6 @@ func (s *HTTPServer) registerEnterpriseHandlers() { s.mux.HandleFunc("/v1/quota/", s.wrap(s.entOnly)) s.mux.HandleFunc("/v1/quota", s.wrap(s.entOnly)) - s.mux.HandleFunc("/v1/operator/license", s.wrap(s.entOnly)) - s.mux.HandleFunc("/v1/recommendation", s.wrap(s.entOnly)) s.mux.HandleFunc("/v1/recommendations", s.wrap(s.entOnly)) s.mux.HandleFunc("/v1/recommendations/apply", s.wrap(s.entOnly)) diff --git a/command/agent/operator_endpoint.go b/command/agent/operator_endpoint.go index ed4a3c4cb73..f2bd6b20561 100644 --- a/command/agent/operator_endpoint.go +++ b/command/agent/operator_endpoint.go @@ -289,6 +289,17 @@ func (s *HTTPServer) schedulerUpdateConfig(resp http.ResponseWriter, req *http.R return reply, nil } +func (s *HTTPServer) LicenseRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) { + switch req.Method { + case "GET": + resp.WriteHeader(http.StatusNoContent) + return "", nil + default: + return nil, CodedError(405, ErrInvalidMethod) + } + +} + func (s *HTTPServer) SnapshotRequest(resp http.ResponseWriter, req *http.Request) (interface{}, error) { switch req.Method { case "GET":