Open didnt1able opened 4 years ago
Thanks, I haven't actually looked at IPFS in a long time.
From what you've said, in principle I agree. We'd want to detect if it's a subdomain gateway (How? Do we just check if the domain looks like ipfs.$foo? What about ipfs.io or other public non-subdomain gateways? Or are they subdomain gateways now too? Maybe we just check for a cid at the start of the domain?), and if it looks like it's a subdomain gateway, then do what you said.
It's unlikely I'll implement this but I'd merge a sensible pull request.
Could check with a regexp
^(http|https)://+(b[^.]{42,}\.ipfs\.+)
Im going to do some research on how to implement something like this
When accessing via a subdomain gateway it is unable to resolve
Could change the hash replace to
<cid>.ipfs.localhost:8080/#<decryption_key>-firstview