-
Notifications
You must be signed in to change notification settings - Fork 108
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
docs: add example of gateway that proxies to ?format=raw #151
Conversation
Feedback welcome @lidel @aschmahmann. I'm not sure to which point IPNS is within the scope of this PR. We could use the raw keys, but we would still have to deal with DNSLink (#149). |
Codecov Report
@@ Coverage Diff @@
## main #151 +/- ##
==========================================
- Coverage 18.50% 18.23% -0.28%
==========================================
Files 96 99 +3
Lines 10337 10537 +200
==========================================
+ Hits 1913 1921 +8
- Misses 8152 8342 +190
- Partials 272 274 +2
|
While it is fine to have this example without IPNS/DNSLink, the bifrost production binary will need it – I've wrote some thoughts ipfs-inactive/bifrost-gateway#5. @hacdias perhaps you could implement a PoC here that uses HTTP RPC at |
31241d6
to
40e6eb6
Compare
@lidel I reworked and added IPNS resolution: DNSLink goes through normal DNS requests implemented in the |
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.
Namesys with custom routing lgtm,
but for this to be an useful example it needs better error handling (details inline)
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.
@hacdias lgtm! small asks below, then feel free to merge (ok to add subdomains later) 👍
@lidel I updated the blockstore to add validation by default, which makes sense for this example, since we are proxying requests to a remote untrusted blockstore. I had missed that. I also added two smoke tests to ensure we get an HTTP error when the remote gives invalid content, and gives 200 and the right content when the content is indeed valid. I will merge once CI is green. |
Closes #142. Depends on #147.
Since this is largely based on #147, I'm basing this on top of that. I reorganized the functions so I could re-use them. Part of the fetcher code is mostly based on https://github.com/filecoin-saturn/caboose.
I just have to see how I can pass-through DNSLink and IPNS requests for resolution.