0
Fork 0
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:
Petu Eusebiu 2022-05-25 13:22:16 +03:00 committed by Ramkumar Chinchani
parent dcdeb935fd
commit aeb8a5da39

View file

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