From 909a89647bfec2786874efff1fe16d175833a4dd Mon Sep 17 00:00:00 2001 From: Remco Verhoef Date: Mon, 8 May 2017 12:45:19 -0700 Subject: [PATCH] Use default endpoint when not supplied --- cmd/gateway-gcs-layer.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }