mirror of
https://github.com/rclone/rclone.git
synced 2025-02-23 05:51:36 +01:00
gcs: fix anonymous client to use rclone's HTTP client
This commit is contained in:
parent
b0491dec88
commit
072464cbdb
@ -411,7 +411,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
|||||||
opt.ServiceAccountCredentials = string(loadedCreds)
|
opt.ServiceAccountCredentials = string(loadedCreds)
|
||||||
}
|
}
|
||||||
if opt.Anonymous {
|
if opt.Anonymous {
|
||||||
oAuthClient = &http.Client{}
|
oAuthClient = fshttp.NewClient(ctx)
|
||||||
} else if opt.ServiceAccountCredentials != "" {
|
} else if opt.ServiceAccountCredentials != "" {
|
||||||
oAuthClient, err = getServiceAccountClient(ctx, []byte(opt.ServiceAccountCredentials))
|
oAuthClient, err = getServiceAccountClient(ctx, []byte(opt.ServiceAccountCredentials))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user