-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check content-type when using referrers API #635
fix: check content-type when using referrers API #635
Conversation
@Wwwsylvia @shizhMSFT This is ready from my perspective. Once you review the PR I can rebase if desired. |
ffed3d8
to
fc50894
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
+ Coverage 75.20% 75.23% +0.03%
==========================================
Files 59 59
Lines 5473 5480 +7
==========================================
+ Hits 4116 4123 +7
Misses 1001 1001
Partials 356 356 ☔ View full report in Codecov by Sentry. |
@shizhMSFT Can we get this merged? |
Just back from some other work, sorry for the delay! I'm reviewing it. |
@Wwwsylvia I liked you changes. I tested them and it still resolves the original issue. Let me know if there are any other changes or if you want me to squash the commits. |
Return an ErrUnsupported to when the referrers API is not supported. Signed-off-by: Kyle M. Tarplee <[email protected]>
fd92b01
to
c14305f
Compare
@Wwwsylvia @shizhMSFT This is rebased and should be ready to be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When accessing the referrer's API, this adds a check to make sure the content-type is an OCI index.
Also fixes the tests to properly set the content-type header in the response.
Closes #633