Skip to content

Commit

Permalink
fix: allow http auth in volume clone
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Apr 11, 2024
1 parent 189d088 commit 6174005
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/azurefile/controllerserver.go
Expand Up @@ -1272,7 +1272,9 @@ func (d *Driver) generateSASToken(accountName, accountKey, storageEndpointSuffix
if err != nil {
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new shared key credential, accountName: %s, err: %s", accountName, err.Error()))
}
serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.file.%s/", accountName, storageEndpointSuffix), credential, nil)
clientOptions := service.ClientOptions{}
clientOptions.InsecureAllowCredentialWithHTTP = true
serviceClient, err := service.NewClientWithSharedKeyCredential(fmt.Sprintf("https://%s.file.%s/", accountName, storageEndpointSuffix), credential, &clientOptions)
if err != nil {
return "", status.Errorf(codes.Internal, fmt.Sprintf("failed to generate sas token in creating new client with shared key credential, accountName: %s, err: %s", accountName, err.Error()))
}
Expand Down

0 comments on commit 6174005

Please sign in to comment.