From 7e107201c203aa9f74ecb4fbb629ff139b2c8155 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 17 Dec 2018 19:09:07 +0800 Subject: [PATCH] Add X-Project-Id HEAD for AKSK auth X-Project-Id parameter should be added into HTTP HEAD when we use AKSK authentication, like: huaweicloud-sdk-python do. Related-Bug: theopenlab/openlab#130 --- provider_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/provider_client.go b/provider_client.go index 6b0216e78..efa0b0bb6 100644 --- a/provider_client.go +++ b/provider_client.go @@ -234,6 +234,7 @@ func (client *ProviderClient) Request(method, url string, options *RequestOpts) AccessKey: client.AKSKAuthOptions.AccessKey, SecretKey: client.AKSKAuthOptions.SecretKey, }) + req.Header.Set("X-Project-Id", client.AKSKAuthOptions.ProjectId) } // Issue the request.