A bit refactoring.

This commit is contained in:
Roman Vynar
2018-07-04 17:31:15 +03:00
parent e163b5af27
commit d1ce70490c
9 changed files with 100 additions and 75 deletions

View File

@@ -69,7 +69,7 @@ func NewClient(url string, verifyTLS bool, username, password string) *Client {
c.logger.Warn("No token auth service discovered from ", c.url)
return nil
}
} else if strings.HasPrefix(strings.ToLower(authHeader), strings.ToLower("Basic")) {
} else if strings.HasPrefix(strings.ToLower(authHeader), "basic") {
c.request = c.request.SetBasicAuth(c.username, c.password)
c.logger.Info("It was discovered the registry is configured with HTTP basic auth.")
}