Skip to content

Commit

Permalink
Merge pull request #523 from mlofjard/fix-digest-accept-headers
Browse files Browse the repository at this point in the history
Fix digest accept headers
  • Loading branch information
fmartinou authored Dec 30, 2024
2 parents b9610a5 + 5689033 commit e93642f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/registries/Registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Registry extends Component {
image,
url: `${image.registry.url}/${image.name}/manifests/${tagOrDigest}`,
headers: {
Accept: 'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json',
Accept: 'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json',
},
});
if (responseManifests) {
Expand Down
8 changes: 4 additions & 4 deletions app/registries/Registry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test('getImageManifestDigest should return digest for application/vnd.docker.dis
registryMocked.callRegistry = (options) => {
if (
options.headers.Accept ===
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json'
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json'
) {
return {
schemaVersion: 2,
Expand Down Expand Up @@ -117,7 +117,7 @@ test('getImageManifestDigest should return digest for application/vnd.docker.dis
registryMocked.callRegistry = (options) => {
if (
options.headers.Accept ===
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json'
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json'
) {
return {
schemaVersion: 2,
Expand Down Expand Up @@ -170,7 +170,7 @@ test('getImageManifestDigest should return digest for application/vnd.docker.dis
registryMocked.callRegistry = (options) => {
if (
options.headers.Accept ===
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json'
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json'
) {
return {
schemaVersion: 2,
Expand Down Expand Up @@ -219,7 +219,7 @@ test('getImageManifestDigest should return digest for application/vnd.docker.con
registryMocked.callRegistry = (options) => {
if (
options.headers.Accept ===
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json'
'application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.index.v1+json, application/vnd.docker.distribution.manifest.v2+json, application/vnd.oci.image.manifest.v1+json'
) {
return {
schemaVersion: 1,
Expand Down

0 comments on commit e93642f

Please sign in to comment.