-
Notifications
You must be signed in to change notification settings - Fork 324
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
Feature Suggestion: normalize href
and src
with unhandled protocols
#286
Comments
Actually there is an experimental feature that enables basic support for As for native protocol that is displayed in Location bar and can be used for loading site assets or clicking on links on pages : PS. @bonds certificate for ggr.com expired today – you may want to renew it as soon as possible:
|
Hm.. after giving it a thought I think I missed your point, sorry! I agree, we should be able to detect use of Reopening. |
Thanks for the note about ggr.com SSL cert, its now fixed. I've enable the experimental support for |
href
and src
with unhandled protocols
Content script detects IPFS-related protocols in `href` and `src` attributes of Elements such as `<a>` or `<img>` and replaces them with URL at the user-specified public HTTP gateway. Note that if IPFS API is online, HTTP request will be redirected to custom gateway. Closes #286
:) Tried it and it correctly converted the ipns URL at https://ggr.com/ipfs.html: ipns://ggr.com -> https://ipfs.io/ipns/ggr.com but when I clicked on the link, the Gateway Redirect sent me to: http://127.0.0.1:8080/ipfs/QmPCawMTd7csXKf7QVr2B1QRDZxdPeWxtE4EpkDRYtJWty/ipns/ggr.com which gave the error:
disabling Gateway Redirect avoids that problem and gets me to the public gateway with the correct path though, so...progress! :) |
Ah, yes, it looks like a bug in 'dnslink' experiment. If you disable it, it should work fine. |
I don't notice a change in behaviour--an anchor for ipns://ggr.com still works if I disable dnslink support, and it is still is broken if I enable dnslink suppport, because I get redirected to http://127.0.0.1:8080/ipfs/QmPCawMTd7csXKf7QVr2B1QRDZxdPeWxtE4EpkDRYtJWty/ipns/ggr.com. ipns://ipfs.git.sexy works fine with dnslink both on and off. Well, one change in behaviour actually...it no longer linkifies a plain-text ipns://ggr.com ...perhaps THAT was the point...don't linkify if its going to be broken? |
Let me know if it helps. |
* mentioned redirect should not happen anymore -- maybe its a stale
cache in browser -- can close and open the browser&daemon and try
again?
Confirmed--once I restarted Firefox it worked...no more broken redirect.
I noticed the modified date of ipfs-companion changed from 2017-10-10 to
2017-10-11, so perhaps I was just running the old version.
|
@bonds just a heads up: we are moving away from mutating DOM of every page for performance and stability reasons: #836 To make your blog future-proof it should be enough to rely on DNSLink and content-addressing alone. To maximize interop, I suggest use of public gateway links instead: those will get upgraded by ipfs-companion and future browsers with native support, while regular users will still be able to fetch content over HTTP. If you need to use clickable ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi <a href="https://ipfs.io/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi">
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
</a> It is the safest way right now. |
Got it, thanks!
On Thu, Dec 12, 2019, at 8:35 AM, Marcin Rataj wrote:
@bonds <https://github.com/bonds> just a heads up: we are moving away from mutating DOM of every page for performance and stability reasons: #836 <#836>
To make your blog future-proof it should be enough to rely on DNSLink and content-addressing alone.
If you want to use `ipfs://`, be aware most of the browsers won't be able to open it without additional software.
To maximize interop, I suggest use of public gateway links instead: those will get upgraded by ipfs-companion and future browsers with native support, while regular users will still be able to fetch content over HTTP.
If you need to use clickable `ipfs://cid` in a blog post, do it like this:
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi <https://ipfs.io/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi>
<a href="https://ipfs.io/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi">
ipfs://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
</a>
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#286>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAANBORWPAVB654FQRGOKRTQYJR5VANCNFSM4D6DZCHQ>.
|
If you click on a normal HTML anchors that refer to an ipfs or ipns address, Firefox complains that it doesn't understand the protocol:
The world would be a better place if the ipfs-companion saw those (broken) links and turned them into links that work, i.e.
becomes
That way people can start using
ipns://
in their HTML anchors and their ipfs-companion equipped visitors will be able to follow those links and we can start living in the future right now.The text was updated successfully, but these errors were encountered: