Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Use a GET requests for our private registry
Browse files Browse the repository at this point in the history
To avoid wrongly signed URLs, more info
in quay#1264
  • Loading branch information
hectorhuertas committed May 12, 2021
1 parent 7cd62d5 commit d34d44d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/clairctl/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,14 @@ func Inspect(ctx context.Context, r string) (*claircore.Manifest, error) {
if err != nil {
return nil, err
}
req, err := http.NewRequestWithContext(ctx, http.MethodHead, u.String(), nil)

// If the request is for our registry, use a GET request to avoid issue #1264
method := http.MethodHead
if strings.Contains(u.String(), "registry.uw.systems") {
method = http.MethodGet
}

req, err := http.NewRequestWithContext(ctx, method, u.String(), nil)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit d34d44d

Please sign in to comment.