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

URI router for registerProtocolHandler #214

Open
lidel opened this issue Apr 23, 2024 · 2 comments
Open

URI router for registerProtocolHandler #214

lidel opened this issue Apr 23, 2024 · 2 comments

Comments

@lidel
Copy link
Member

lidel commented Apr 23, 2024

Down the road we will need ?uri router from subdomain specs. It is similar to ?helia-sw we already have, but accepts percent-encoded URIs as value, and can be registered via registerProtocolHandler:

navigator.registerProtocolHandler('ipfs', 'https://inbrowser.link/ipfs/?uri=%s', 'IPFS resolver')

Implementing URI router will allow us to use inbrowser.link as drop-in replacement for dweb.link in ipfs-companion and also use it in discussions with standards bodies and browser vendors on the path towards ipfs/in-web-browsers#212 (redirect-based handler is step 1, sw-based one wis step 2. if we can show we have sw ready, and also provide a way of using it with step 1, this makes conversations more conductive).

Ref.

@lidel lidel added this to the Prod: Initial release milestone Apr 23, 2024
@SgtPooki
Copy link
Member

I believe this is a part of specs.ipfs.tech and should live in verified-fetch, yes?

@lidel
Copy link
Member Author

lidel commented May 9, 2024

This is specific to subdomain gateway, so does not benefit users who use veirfied-fetch directly, but yes, implementation-wise, it would be the easiest if it lived in verified-fetch and returned HTTP 301:

  • /ipfs/?uri=%s/ipfs/cid/..
  • /ipns/?uri=%s/ipns/id/..

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

No branches or pull requests

2 participants