Hi fellas, I am curious about the following. Can you kindly comment!
Refer to the TIP here. It advises the use of relative URLs that include content-addressed paths, e.g.
/ipfs/QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi. The paragraph above that TIP reads:
Tools and browser extensions should detect IPFS content paths and resolve them directly over IPFS protocol.
So, a webpage author should be able to put content-addressed relative URLs without any worry.
I naturally assumed that this would work alright for the existing IPFS gateways. So, went to this static website at
/ipns/libp2p.io using the recommended subdomain gateway: https://dweb.link. It redirects to https://libp2p-io.ipns.dweb.link/, as expected, and the page loads perfectly.
Now, to mimic clicking a content-addressed relative URL on this page, I tried this link: https://libp2p-io.ipns.dweb.link/ipfs/QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi. In the spirit of the above quote, I was hoping to be served the IPFS-content at /ipfs/QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi (which actually exists btw). But it just spit out
ipfs resolve -r /ipns/libp2p.io/ipfs/QmNrgEMcUygbKzZeZgYFosdd27VE9KnWbyUD73bKZJ3bGi: no link named “ipfs” under QmfL5Lx8qJycaKnVJSUwvDjzVMVuJ5rYTg9WsNWhSqXwKZ
…meaning the gateway is not aware of content-addressed paths! That means, even when linking to content addressed paths, a site author has to make sure the website directory contains those files at path=
/ipfs/<CID>, with filename=
<CID>. How can this make sense