mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
google: use cpcfg.ProxyFunc
This commit is contained in:
@@ -135,7 +135,13 @@ func NewGoogleClient(cfg *GoogleClientConfig) (*SGoogleClient, error) {
|
||||
},
|
||||
TokenURL: google.JWTTokenURL,
|
||||
}
|
||||
client.client = conf.Client(oauth2.NoContext)
|
||||
|
||||
httpClient := httputils.GetDefaultClient()
|
||||
httputils.SetClientProxyFunc(httpClient, cfg.cpcfg.ProxyFunc)
|
||||
ctx := context.Background()
|
||||
ctx = context.WithValue(ctx, oauth2.HTTPClient, httpClient)
|
||||
|
||||
client.client = conf.Client(ctx)
|
||||
return &client, client.fetchRegions()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user