diff --git a/docs/service.go b/docs/service.go index c27f9b1c..3006e8ab 100644 --- a/docs/service.go +++ b/docs/service.go @@ -37,6 +37,9 @@ func (s *Service) ServiceConfig() *registrytypes.ServiceConfig { // It can be used to verify the validity of a client's credentials. func (s *Service) Auth(authConfig *types.AuthConfig, userAgent string) (status, token string, err error) { serverAddress := authConfig.ServerAddress + if serverAddress == "" { + serverAddress = IndexServer + } if !strings.HasPrefix(serverAddress, "https://") && !strings.HasPrefix(serverAddress, "http://") { serverAddress = "https://" + serverAddress }