From 6b404abeaff61120a35e8dca86513d19e61d279d Mon Sep 17 00:00:00 2001 From: Robert Wysocki Date: Fri, 15 Jun 2018 13:15:34 +0100 Subject: [PATCH] [feature/nexus-compatibility] Enable Sonatype Nexus compatibility --- registry/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/client.go b/registry/client.go index 444690d..c94ed59 100644 --- a/registry/client.go +++ b/registry/client.go @@ -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(authHeader, "Basic") { + } else if strings.HasPrefix(strings.ToLower(authHeader), strings.ToLower("Basic")) { c.request = c.request.SetBasicAuth(c.username, c.password) c.logger.Info("It was discovered the registry is configured with HTTP basic auth.") }