0
Fork 0
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:
Petu Eusebiu 2022-05-25 13:23:06 +03:00 committed by Ramkumar Chinchani
parent aeb8a5da39
commit bd730150a8
2 changed files with 4 additions and 1 deletions

View file

@ -28,7 +28,8 @@ import (
)
const (
SyncBlobUploadDir = ".sync"
SyncBlobUploadDir = ".sync"
httpMaxRedirectsCount = 15
)
// /v2/_catalog struct.

View file

@ -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
}