Skip to content

Commit

Permalink
removed trailing / if exist in url
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy <[email protected]>
  • Loading branch information
Vivek Reddy committed Nov 26, 2024
1 parent a88493c commit 1ec5019
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/splunk/client/azureblobclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ func NewAzureBlobClient(
var serviceURL string
if endpoint != "" {
serviceURL = endpoint
if serviceURL[len(serviceURL)-1] == '/' {
serviceURL = serviceURL[:len(serviceURL)-1]
}
} else if region != "" {
serviceURL = fmt.Sprintf("https://%s.blob.%s.core.windows.net", storageAccountName, region)
} else {
Expand Down Expand Up @@ -203,7 +206,7 @@ func NewAzureBlobClient(

// Initialize the container client with Token Credential.
rawContainerClient, err := container.NewClient(
fmt.Sprintf("%s%s", serviceURL, bucketName),
fmt.Sprintf("%s/%s", serviceURL, bucketName),
tokenCredential,
nil,
)
Expand Down

0 comments on commit 1ec5019

Please sign in to comment.