Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

azureblob/auth: add Microsoft Partner Network User-Agent prefix

Nick Craig-Woodbbd7297b33d8
diff --git a/backend/azureblob/auth/auth.go b/backend/azureblob/auth/auth.go
index b1e365dec..bbea6a4fb 100644
--- a/backend/azureblob/auth/auth.go
+++ b/backend/azureblob/auth/auth.go
@@ -9,6 +9,7 @@ import (
"net/http"
"net/url"
"os"
+ "strings"
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
@@ -283,6 +284,9 @@ type transporter struct {
// Make a new transporter
func newTransporter(ctx context.Context) transporter {
+ // Set the User-Agent to include the Microsoft Partner Network prefix
+ ctx, ci := fs.AddConfig(ctx)
+ ci.UserAgent = "APN/1.0 rclone/1.0 rclone/" + strings.TrimPrefix(fs.Version, "v")
return transporter{
RoundTripper: fshttp.NewTransport(ctx),
}