Skip to content

Commit 1ec5019

Browse files
author
Vivek Reddy
committed
removed trailing / if exist in url
Signed-off-by: Vivek Reddy <[email protected]>
1 parent a88493c commit 1ec5019

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/splunk/client/azureblobclient.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ func NewAzureBlobClient(
138138
var serviceURL string
139139
if endpoint != "" {
140140
serviceURL = endpoint
141+
if serviceURL[len(serviceURL)-1] == '/' {
142+
serviceURL = serviceURL[:len(serviceURL)-1]
143+
}
141144
} else if region != "" {
142145
serviceURL = fmt.Sprintf("https://%s.blob.%s.core.windows.net", storageAccountName, region)
143146
} else {
@@ -203,7 +206,7 @@ func NewAzureBlobClient(
203206

204207
// Initialize the container client with Token Credential.
205208
rawContainerClient, err := container.NewClient(
206-
fmt.Sprintf("%s%s", serviceURL, bucketName),
209+
fmt.Sprintf("%s/%s", serviceURL, bucketName),
207210
tokenCredential,
208211
nil,
209212
)

0 commit comments

Comments
 (0)