mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
sync: specify contentType in headers when GETing cosign manifest
Signed-off-by: Petu Eusebiu <peusebiu@cisco.com>
This commit is contained in:
parent
dcdeb935fd
commit
aeb8a5da39
1 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,9 @@ func getCosignManifest(client *resty.Client, regURL url.URL, repo, digest string
|
||||||
|
|
||||||
getCosignManifestURL.RawQuery = getCosignManifestURL.Query().Encode()
|
getCosignManifestURL.RawQuery = getCosignManifestURL.Query().Encode()
|
||||||
|
|
||||||
resp, err := client.R().Get(getCosignManifestURL.String())
|
resp, err := client.R().
|
||||||
|
SetHeader("Content-Type", "application/vnd.oci.image.manifest.v1+json").
|
||||||
|
Get(getCosignManifestURL.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Str("url", getCosignManifestURL.String()).
|
log.Error().Err(err).Str("url", getCosignManifestURL.String()).
|
||||||
Msgf("couldn't get cosign manifest: %s", cosignTag)
|
Msgf("couldn't get cosign manifest: %s", cosignTag)
|
||||||
|
|
Loading…
Reference in a new issue