mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03:00
gateway: Support for custom endpoint. (#4086)
This commit is contained in:
committed by
Minio Trusted
parent
8a7cffe7b8
commit
fb506c7fca
+5
-3
@@ -123,9 +123,11 @@ func azureToObjectError(err error, params ...string) error {
|
||||
}
|
||||
|
||||
// Inits azure blob storage client and returns AzureObjects.
|
||||
func newAzureLayer(account, key string) (GatewayLayer, error) {
|
||||
useHTTPS := true
|
||||
c, err := storage.NewClient(account, key, storage.DefaultBaseURL, globalAzureAPIVersion, useHTTPS)
|
||||
func newAzureLayer(endPoint string, account, key string, secure bool) (GatewayLayer, error) {
|
||||
if endPoint == "" {
|
||||
endPoint = storage.DefaultBaseURL
|
||||
}
|
||||
c, err := storage.NewClient(account, key, endPoint, globalAzureAPIVersion, secure)
|
||||
if err != nil {
|
||||
return AzureObjects{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user