Use s3.amazonaws.com as default endpoint, fixes #4240 (#4242)

This commit is contained in:
Remco Verhoef 2017-05-03 22:41:03 -07:00 committed by Dee Koder
parent 2121b78ea7
commit 069cf9e8aa

View File

@ -99,6 +99,11 @@ type s3Gateway struct {
// newS3Gateway returns s3 gatewaylayer
func newS3Gateway(endpoint string, accessKey, secretKey string, secure bool) (GatewayLayer, error) {
if endpoint == "" {
endpoint = "s3.amazonaws.com"
secure = true
}
// Initialize minio client object.
client, err := minio.NewCore(endpoint, accessKey, secretKey, secure)
if err != nil {