Merge pull request #2620 from ioito/hotfix/qx-aliyun-ug

hotfix: add aliyun request user-agent
This commit is contained in:
yunion-ci-robot
2019-08-29 16:44:12 +08:00
committed by GitHub
+2
View File
@@ -24,6 +24,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
v "yunion.io/x/pkg/util/version"
"yunion.io/x/pkg/utils"
"github.com/aliyun/aliyun-oss-go-sdk/oss"
@@ -132,6 +133,7 @@ func _jsonRequest(client *sdk.Client, domain string, version string, apiName str
}
}
req.Scheme = "https"
req.GetHeaders()["User-Agent"] = "vendor/yunion-OneCloud@" + v.Get().GitVersion
resp, err := processCommonRequest(client, req)
if err != nil {