Support Web API navigator.registerProtocolHandler #7686
Labels
effort/hours
Estimated to take one or several hours
exp/beginner
Can be confidently tackled by newcomers
kind/bug
A bug in existing code (including security flaws)
kind/enhancement
A net-new feature or improvement to an existing feature
need/community-input
Needs input from the wider community
need/maintainers-input
Needs input from the current maintainer(s)
P2
Medium: Good to have, but can wait until someone steps up
topic/gateway
Topic gateway
What
I propose we add support for
?uri=
which would decode passed URI and return HTTP 301 redirect to proper/ipfs/
or/ipns/
path.This is pretty trivial to add, but wanted to agree on
?url=
(or other means) before I submit PR.cc @autonome @Gozala @aschmahmann @achingbrain
Why
Now that Chromium 86 safelisted
ipfs://
,ipns://
anddweb:
we should support requests produced bynavigator.registerProtocolHandler
on gateways.Namely, if someone registers
dweb.link
as URI handler foripfs://
:Then opening
ipfs://QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
Chromium will produce HTTP GET with URI-encoded URI:Using URL parameter
?uri=
seems safer than/uri/%s
because it does not clash with path-based logic already present in gateway code, but I am open for suggestions, if there is a better way to represent this.The text was updated successfully, but these errors were encountered: