feat: enable specifying harbor as remote domain in REGISTRY_PROXY_REMOTEDOMAIN

https://github.com/distribution/distribution/discussions/4340

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
This commit is contained in:
kahirokunn 2024-05-08 10:07:26 +09:00
parent c49220d492
commit 831de8fa36

View File

@ -239,7 +239,9 @@ func (r *remoteAuthChallenger) tryEstablishChallenges(ctx context.Context) error
defer r.Unlock()
remoteURL := r.remoteURL
if remoteURL.Path == "" || remoteURL.Path == "/" {
remoteURL.Path = "/v2/"
}
challenges, err := r.cm.GetChallenges(remoteURL)
if err != nil {
return err