-
Notifications
You must be signed in to change notification settings - Fork 15
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
Create Browser gateway #11
Comments
I've implemented a naive one https://github.com/linonetwo/ipfs-browser-gateway, but I'm not familiar with ipfs' DAG traversal, so I stopped there. Can you give me some advice, so I can make PR here? |
@linonetwo that's super cool! What we want is to mimic the IPFS HTTP Gateway that one gets when spawning a daemon but through a service worker http proxy. Why did you need DAG Traversal? The HTTP Gateway only operates over Files. Could you give me an example? |
Besides adding a single file, people would serve the website and add folders too. When I https://ipfs.io/ipfs/QmRoYXgYMfcP7YQR4sCuSeJy9afgA5XDJ78JzWntpRhmcu seems to be another kind of folder. And use @diasdavid Maybe I need to read the code in the ipfs daemon? |
@linonetwo check the http gateway code at https://github.com/ipfs/js-ipfs/tree/master/src/http/gateway |
Thanks, I know how it works now. I can reuse /src/http/gateway/resolver.js and copy some core parts of /src/http/gateway/resources/gateway.js if But I didn't find a way to properly import Most depended npm package was replaced by
And I'm still learning how to return a stream from service worker, so still WIP. |
It's mostly finished, but:
Hope somebody can review it, it's mostly the same as https://github.com/ipfs/js-ipfs/tree/master/src/http/gateway |
@linonetwo I have already been working on this issue, so thanks for your contribution. I will analyse your implementation asap |
Repo for the |
@vasco-santos Thank you too. I'm eager to discuss with you. |
More information will be availble from the OKRs
The text was updated successfully, but these errors were encountered: