From 29d66c0267062f76d66f5c49dd64d890c5579b0b Mon Sep 17 00:00:00 2001 From: Alan Moran Date: Thu, 21 Nov 2024 13:28:48 +0100 Subject: [PATCH] Removes subrouter in api server --- src/autoscaler/api/publicapiserver/public_api_server.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/autoscaler/api/publicapiserver/public_api_server.go b/src/autoscaler/api/publicapiserver/public_api_server.go index 5bb3765b6c..7bae65880e 100644 --- a/src/autoscaler/api/publicapiserver/public_api_server.go +++ b/src/autoscaler/api/publicapiserver/public_api_server.go @@ -102,14 +102,9 @@ func (s *PublicApiServer) CreateCFServer() (ifrit.Runner, error) { return nil, err } - mainRouter := mux.NewRouter() r := s.autoscalerRouter.GetRouter() - mainRouter.PathPrefix("/v2").Handler(r) - mainRouter.PathPrefix("/v1").Handler(r) - mainRouter.PathPrefix("/health").Handler(r) - mainRouter.PathPrefix("/").Handler(s.healthRouter) - return helpers.NewHTTPServer(s.logger, s.conf.VCAPServer, mainRouter) + return helpers.NewHTTPServer(s.logger, s.conf.VCAPServer, r) } func (s *PublicApiServer) CreateMtlsServer() (ifrit.Runner, error) {