Skip to content

Commit

Permalink
send accept header when fetching image manifest (#98)
Browse files Browse the repository at this point in the history
Signed-off-by: Brian DeHamer <[email protected]>
  • Loading branch information
bdehamer authored Jan 19, 2024
1 parent 0528779 commit 1f485f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/oci/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ export class RegistryClient {
async checkManifest(reference: string): Promise<CheckManifestResponse> {
const response = await this.#fetch(
`${this.#baseURL}/v2/${this.#repository}/manifests/${reference}`,
{ method: 'HEAD' }
{
method: 'HEAD',
headers: {
[HEADER_ACCEPT]: `${CONTENT_TYPE_OCI_MANIFEST},${CONTENT_TYPE_OCI_INDEX}`
}
}
).then(ensureStatus(200))

const mediaType =
Expand Down

0 comments on commit 1f485f3

Please sign in to comment.