Skip to content

Commit

Permalink
fix: set default admin (#2042)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com>
  • Loading branch information
ZhangSetSail authored Nov 19, 2024
1 parent 80e013d commit 9f8f025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions builder/sources/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ func WrapTransport(transport http.RoundTripper, url, username, password string)

func newFromTransport(registryURL, username, password string, transport http.RoundTripper, logf LogfCallback) (*Registry, error) {
url := strings.TrimSuffix(registryURL, "/")
containsScheme := strings.HasPrefix(url, "http")
containsScheme := strings.HasPrefix(url, "https")
if !containsScheme {
// use https by default
url = fmt.Sprintf("https://%s", registryURL)
url = fmt.Sprintf("http://%s", registryURL)
}

if username != "" {
Expand Down

0 comments on commit 9f8f025

Please sign in to comment.