Skip to content

Commit

Permalink
Use new method to get Uri base.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuyu committed Aug 26, 2024
1 parent b602518 commit 7416bb9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/NuGet.Services.Storage/AzureStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,7 @@ public static Uri GetPrimaryServiceUri(string storageConnectionString)
{
var tempClient = new BlobServiceClient(storageConnectionString);
// if _storageConnectionString has SAS token, Uri will contain SAS signature, we need to strip it
var uriBuilder = new UriBuilder(tempClient.Uri);
uriBuilder.Query = "";
uriBuilder.Fragment = "";
return uriBuilder.Uri;
return new Uri(tempClient.Uri.GetLeftPart(UriPartial.Path));
}
}
}

0 comments on commit 7416bb9

Please sign in to comment.