Skip to content

Commit c971157

Browse files
committed
Merge remote-tracking branch 'origin/release/v11.0.2' into release/v11.0.2
2 parents e70d0ee + 0379495 commit c971157

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

plugins/azure/main.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,12 @@ func detectCloudFromConnectionString(connectionString string) (CloudEndpoints, e
140140
return CloudEndpoints{}, fmt.Errorf("connection string is empty")
141141
}
142142

143-
connStrLower := strings.ToLower(connectionString)
144-
145143
for _, cloud := range SupportedClouds {
146-
if strings.Contains(connStrLower, strings.ToLower(cloud.EventHubSuffix)) {
147-
return cloud, nil
148-
}
149-
if strings.Contains(connStrLower, strings.ToLower(cloud.StorageSuffix)) {
144+
if strings.Contains(connectionString, cloud.EventHubSuffix+"/") {
150145
return cloud, nil
151146
}
152-
}
153147

154-
for _, cloud := range SupportedClouds {
155-
if cloud.Name == AzurePublic {
148+
if strings.Contains(connectionString, "EndpointSuffix="+cloud.StorageSuffix) {
156149
return cloud, nil
157150
}
158151
}

0 commit comments

Comments
 (0)