sync: allow HTTP redirects when GETing signatures blobs
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
aeb8a5da39
commit
bd730150a8
@ -28,7 +28,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
SyncBlobUploadDir = ".sync"
|
||||
SyncBlobUploadDir = ".sync"
|
||||
httpMaxRedirectsCount = 15
|
||||
)
|
||||
|
||||
// /v2/_catalog struct.
|
||||
|
@ -251,6 +251,8 @@ func getHTTPClient(regCfg *RegistryConfig, upstreamURL string, credentials Crede
|
||||
client.SetBasicAuth(credentials.Username, credentials.Password)
|
||||
}
|
||||
|
||||
client.SetRedirectPolicy(resty.FlexibleRedirectPolicy(httpMaxRedirectsCount))
|
||||
|
||||
return client, registryURL, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user