Skip to content

Commit 95353e8

Browse files
committed
Use basic auth when token endpoint is not found
1 parent a193a71 commit 95353e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/client/selfhosted/selfhosted.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const (
3434

3535
// HTTP headers to request API version
3636
dockerAPIv1Header = "application/vnd.docker.distribution.manifest.v1+json"
37+
ociV1Header = "application/vnd.oci.image.manifest.v1+json"
3738
dockerAPIv2Header = "application/vnd.docker.distribution.manifest.v2+json"
3839
)
3940

@@ -237,6 +238,7 @@ func (c *Client) doRequest(ctx context.Context, url, header string, obj interfac
237238

238239
if len(header) > 0 {
239240
req.Header.Set("Accept", header)
241+
req.Header.Set("Accept", ociV1Header)
240242
}
241243

242244
resp, err := c.Do(req)

0 commit comments

Comments
 (0)