From f0317d6d879db745cabd2ae51bf6619268db9a05 Mon Sep 17 00:00:00 2001 From: "Herwono W. Wijaya" <3977708+herwonowr@users.noreply.github.com> Date: Wed, 25 Apr 2018 21:58:08 +0700 Subject: [PATCH] fix(api): fix the ability to push images to private repositories --- api/http/proxy/transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/http/proxy/transport.go b/api/http/proxy/transport.go index 98e15d29a..f5491213e 100644 --- a/api/http/proxy/transport.go +++ b/api/http/proxy/transport.go @@ -262,7 +262,7 @@ func (p *proxyTransport) proxyImageRequest(request *http.Request) (*http.Respons case "/images/create": return p.replaceRegistryAuthenticationHeader(request) default: - if match, _ := path.Match("/images/*/push", requestPath); match { + if path.Base(requestPath) == "push" && request.Method == http.MethodPost { return p.replaceRegistryAuthenticationHeader(request) } return p.executeDockerRequest(request)