Skip to content

Commit

Permalink
simplify comment
Browse files Browse the repository at this point in the history
Signed-off-by: Meredith Lancaster <[email protected]>
  • Loading branch information
malancas committed Jul 1, 2024
1 parent dc23d31 commit 1e09863
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pkg/webhook/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ type noncompliantRegistryTransport struct{}

/*
RoundTrip will check if a request and associated response fulfill the following:
1. The response returns a 406 status code
2. The request path contains /referrers/
3. The response content type is not application/vnd.oci.image.index.v1+json
1. The response returns a 406 status code and the request path contains /referrers/
2. The response content type is not application/vnd.oci.image.index.v1+json
If conditions #1 and #2 are both met OR condition #3 is met,
the response's status code will be overwritten to 404.
If either condition is met, the response's status code will be overwritten to 404.
This is a temporary solution to handle non compliant registries that either:
1. return an unexpected status code 406 when the go-containerregistry library used
Expand Down

0 comments on commit 1e09863

Please sign in to comment.