Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
Signed-off-by: wangxiaoxuan273 <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Apr 20, 2023
1 parent c97288d commit 2a558c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@ func Credential(store Store) func(context.Context, string) (auth.Credential, err
}
}

// The Docker CLI expects that the 'docker.io' credential
// will be added under the key "https://index.docker.io/v1/"
func mapStoreRegistryName(registry string) string {
// The Docker CLI expects that the 'docker.io' credential
// will be added under the key "https://index.docker.io/v1/"
if registry == "docker.io" {
return "https://index.docker.io/v1/"
}
return registry
}

// It is expected that the traffic targetting "registry-1.docker.io"
// will be redirected to "https://index.docker.io/v1/"
func mapAuthenticationRegistryName(target string) string {
if target == "registry-1.docker.io" {
func mapAuthenticationRegistryName(hostname string) string {
// It is expected that the traffic targetting "registry-1.docker.io"
// will be redirected to "https://index.docker.io/v1/"
if hostname == "registry-1.docker.io" {
return "https://index.docker.io/v1/"
}
return target
return hostname
}

0 comments on commit 2a558c2

Please sign in to comment.