fix(api): fix the ability to push images to private repositories

pull/1841/head
Herwono W. Wijaya 2018-04-25 21:58:08 +07:00 committed by Anthony Lapenna
parent afa3fd9a47
commit f0317d6d87
1 changed files with 1 additions and 1 deletions

View File

@ -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)