diff --git a/api/http/handler/docker/handler.go b/api/http/handler/docker/handler.go index 487611e63..290a57975 100644 --- a/api/http/handler/docker/handler.go +++ b/api/http/handler/docker/handler.go @@ -40,14 +40,14 @@ func NewHandler(bouncer security.BouncerService, authorizationService *authoriza } // endpoints - endpointRouter := h.PathPrefix("/{id}").Subrouter() + endpointRouter := h.PathPrefix("/docker/{id}").Subrouter() endpointRouter.Use(middlewares.WithEndpoint(dataStore.Endpoint(), "id")) endpointRouter.Use(dockerOnlyMiddleware) - containersHandler := containers.NewHandler("/{id}/containers", bouncer, dataStore, dockerClientFactory, containerService) + containersHandler := containers.NewHandler("/docker/{id}/containers", bouncer, dataStore, dockerClientFactory, containerService) endpointRouter.PathPrefix("/containers").Handler(containersHandler) - imagesHandler := images.NewHandler("/{id}/images", bouncer, dockerClientFactory) + imagesHandler := images.NewHandler("/docker/{id}/images", bouncer, dockerClientFactory) endpointRouter.PathPrefix("/images").Handler(imagesHandler) return h } diff --git a/api/http/handler/handler.go b/api/http/handler/handler.go index 76f0de99a..5ad0e3ebf 100644 --- a/api/http/handler/handler.go +++ b/api/http/handler/handler.go @@ -199,7 +199,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { case strings.HasPrefix(r.URL.Path, "/api/kubernetes"): http.StripPrefix("/api", h.KubernetesHandler).ServeHTTP(w, r) case strings.HasPrefix(r.URL.Path, "/api/docker"): - http.StripPrefix("/api/docker", h.DockerHandler).ServeHTTP(w, r) + http.StripPrefix("/api", h.DockerHandler).ServeHTTP(w, r) // Helm subpath under kubernetes -> /api/endpoints/{id}/kubernetes/helm case strings.HasPrefix(r.URL.Path, "/api/endpoints/") && strings.Contains(r.URL.Path, "/kubernetes/helm"):