Skip to content
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

feat: add image type support to proxy endpoint #196

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented Oct 16, 2023

🧿 Current issues / What's wrong ?

The current /proxy endpoint does not support image file, even though we can upload them through /upload/

💊 Fixes / Solution

Add support for /proxy to return images, in addition to json files

Fix #36

🚧 Changes

  • /proxy can now return image
  • refactoring of the cache system, to support setting and returning both json and image type.
  • add tests

🛠️ Tests

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Attention: 73 lines in your changes are missing coverage. Please review.

Comparison is base (4dcdf7a) 32.02% compared to head (bd1f020) 33.57%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #196      +/-   ##
==========================================
+ Coverage   32.02%   33.57%   +1.55%     
==========================================
  Files          15       15              
  Lines         637      676      +39     
  Branches       42       46       +4     
==========================================
+ Hits          204      227      +23     
- Misses        425      441      +16     
  Partials        8        8              
Files Coverage Δ
src/rpc.ts 0.00% <0.00%> (ø)
src/aws.ts 83.09% <74.07%> (-4.63%) ⬇️
src/utils.ts 48.97% <69.56%> (+13.26%) ⬆️
src/providers/index.ts 0.00% <0.00%> (ø)
src/proxy.ts 0.00% <0.00%> (ø)
src/upload.ts 0.00% <0.00%> (ø)
src/middlewares/useProxyCache.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wa0x6e wa0x6e marked this pull request as ready for review October 16, 2023 10:01
@wa0x6e wa0x6e requested a review from ChaituVR October 16, 2023 10:16
@wa0x6e wa0x6e marked this pull request as draft October 16, 2023 10:20
@wa0x6e wa0x6e removed the request for review from ChaituVR October 16, 2023 10:20
@wa0x6e wa0x6e marked this pull request as ready for review October 16, 2023 10:20
@wa0x6e wa0x6e requested a review from ChaituVR October 17, 2023 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make mirror gateway works with image
1 participant