forked from TrueCloudLab/rclone
azurefiles: fix missing x-ms-file-request-intent header
According to the SDK docs > FileRequestIntent is required when using TokenCredential for > authentication. Acceptable value is backup. This sets the correct option in the SDK. It does it for all types of authentication but the SDK seems clever enough not to supply it when it isn't needed. This fixes the error > MissingRequiredHeader An HTTP header that's mandatory for this > request is not specified. x-ms-file-request-intent Fixes #8241
This commit is contained in:
parent
b8835fe7b4
commit
31b874815b
1 changed files with 3 additions and 1 deletions
|
@ -393,8 +393,10 @@ func newFsFromOptions(ctx context.Context, name, root string, opt *Options) (fs.
|
|||
policyClientOptions := policy.ClientOptions{
|
||||
Transport: newTransporter(ctx),
|
||||
}
|
||||
backup := service.ShareTokenIntentBackup
|
||||
clientOpt := service.ClientOptions{
|
||||
ClientOptions: policyClientOptions,
|
||||
ClientOptions: policyClientOptions,
|
||||
FileRequestIntent: &backup,
|
||||
}
|
||||
|
||||
// Here we auth by setting one of cred, sharedKeyCred or f.client
|
||||
|
|
Loading…
Reference in a new issue