Autocorrect user provided Azure endpoint (#5417)

fixes #5373
master
Krishna Srinivas 7 years ago committed by kannappanr
parent 09a9002f12
commit 45c35b3544
  1. 4
      cmd/gateway/azure/gateway-azure.go

@ -130,6 +130,10 @@ func (g *Azure) NewGatewayLayer(creds auth.Credentials) (minio.GatewayLayer, err
}
}
if endpoint == fmt.Sprintf("%s.blob.%s", creds.AccessKey, storage.DefaultBaseURL) {
// If, by mistake, user provides endpoint as accountname.blob.core.windows.net
endpoint = storage.DefaultBaseURL
}
c, err := storage.NewClient(creds.AccessKey, creds.SecretKey, endpoint, globalAzureAPIVersion, secure)
if err != nil {
return &azureObjects{}, err

Loading…
Cancel
Save