diff --git a/src/aliyun/credential.rs b/src/aliyun/credential.rs index baf55c4..8f8c1cf 100644 --- a/src/aliyun/credential.rs +++ b/src/aliyun/credential.rs @@ -140,7 +140,7 @@ impl Loader { // Construct request to Aliyun STS Service. let url = match &self.config.sts_endpoint{ - Some(definde_sts_endpoint) => format!("{}/?Action=AssumeRoleWithOIDC&OIDCProviderArn={}&RoleArn={}&RoleSessionName={}&Format=JSON&Version=2015-04-01&Timestamp={}&OIDCToken={}", definde_sts_endpoint,provider_arn, role_arn, role_session_name, format_rfc3339(now()), token), + Some(definde_sts_endpoint) => format!("https://{}/?Action=AssumeRoleWithOIDC&OIDCProviderArn={}&RoleArn={}&RoleSessionName={}&Format=JSON&Version=2015-04-01&Timestamp={}&OIDCToken={}", definde_sts_endpoint, provider_arn, role_arn, role_session_name, format_rfc3339(now()), token), None => format!("https://sts.aliyuncs.com/?Action=AssumeRoleWithOIDC&OIDCProviderArn={}&RoleArn={}&RoleSessionName={}&Format=JSON&Version=2015-04-01&Timestamp={}&OIDCToken={}", provider_arn, role_arn, role_session_name, format_rfc3339(now()), token), }; let req = self.client.get(&url).header(