From 2b2850d17a717870d027500a944d6290909b604a Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 5 Dec 2017 14:56:40 +0100 Subject: [PATCH] fix(stacks): fix an issue with stacks using docker in their name (#1468) --- api/http/handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/http/handler/handler.go b/api/http/handler/handler.go index 5128a125a..24367f360 100644 --- a/api/http/handler/handler.go +++ b/api/http/handler/handler.go @@ -48,7 +48,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { case strings.HasPrefix(r.URL.Path, "/api/dockerhub"): http.StripPrefix("/api", h.DockerHubHandler).ServeHTTP(w, r) case strings.HasPrefix(r.URL.Path, "/api/endpoints"): - if strings.Contains(r.URL.Path, "/docker") { + if strings.Contains(r.URL.Path, "/docker/") { http.StripPrefix("/api/endpoints", h.DockerHandler).ServeHTTP(w, r) } else if strings.Contains(r.URL.Path, "/stacks") { http.StripPrefix("/api/endpoints", h.StackHandler).ServeHTTP(w, r)