mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 02:11:58 +08:00
Fix the SAS token generation script (#36938)
to account for breaking change in New-AzStorageContainerSASToken which causes it to no longer start with a question mark. See https://learn.microsoft.com/en-us/powershell/azure/release-notes-azureps?view=azps-11.3.0#azstorage-600
This commit is contained in:
parent
89efa21f94
commit
5d7458aa89
@ -26,8 +26,12 @@ function Get-SasToken {
|
||||
$ctx = New-AzStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $key.Value
|
||||
$start = Get-Date -AsUTC
|
||||
$end = $start.AddDays(90)
|
||||
$token = New-AzStorageContainerSASToken -Name $ContainerName -Permission $Permission -StartTime $start -ExpiryTime $end -Context $ctx
|
||||
return $token.Substring(1)
|
||||
$token = New-AzStorageContainerSASToken -Name $ContainerName -Permission $Permission -StartTime $start -ExpiryTime $end -Context $ctx -Protocol HttpsOnly
|
||||
if ($token.StartsWith('?')) {
|
||||
$token = $token.Substring(1)
|
||||
}
|
||||
|
||||
return $token
|
||||
}
|
||||
|
||||
# Asset Cache:
|
||||
|
Loading…
x
Reference in New Issue
Block a user