diff --git a/cmd/gateway-gcs-layer.go b/cmd/gateway-gcs-layer.go index 1e8a26473..4ab8cea7d 100644 --- a/cmd/gateway-gcs-layer.go +++ b/cmd/gateway-gcs-layer.go @@ -162,7 +162,11 @@ func newGCSGateway(endpoint string, projectID, secretKey string, secure bool) (G return nil, err } - anonClient, err := minio.NewCore("storage.googleapis.com", "", "", secure) + if endpoint == "" { + endpoint = "storage.googleapis.com" + } + + anonClient, err := minio.NewCore(endpoint, "", "", secure) if err != nil { return nil, err }