mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
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
2 changed files with 4 additions and 1 deletions
|
@ -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 a new issue