mirror of
https://github.com/rclone/rclone
synced 2024-12-21 11:45:56 +01:00
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
bc08e05a00
commit
e1748a3183
@ -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 New Issue
Block a user