Open jbenet opened 8 years ago
X-Ipns-Resolution
(all steps)X-Ipns-Path
(ipns root path)X-Ipfs-Path
(to show ipfs path, not ipns path)I decided to take a crack at this. (I am quite new to golang, and this seemed simple enough.) "X-Ipfs-Path" is "X-IPFS-Path" at the moment, and has the old behavior of returning a (non-root) ipns path upon requests to ipns paths. I assume we are okay with changing it to "X-Ipfs-Path". Looks better imo, and header keys are case-insensitive, so it shouldn't matter.
Are you sure you want X-Ipns-Path to return an ipns root path? Imo it would make more sense to return the full ipns path. X-Ipns-Resolution would already contain the ipns root path.
I noticed today that gateway are still returning an IPNS path instead of an IPFS path in x-ipfs-path
(both on ipfs.io and cloudflare-ipfs.com). It would be nice to get the actual hash and have a separate header for IPNS.
At this point, I'd rather leave X-IPFS-Path
and add some X-IPFS-Resolved
header (or something like that).
Rational: addons like the browser companion are using the X-IPFS-Path
header to detect resources available on IPFS. That is, we're treating this header as a "content also available here" header.
@agentofuser up for writing a patch (core/corehttp/gateway_handler.go
)?
@Stebalien good point. I haven't used Go before but this seems like it would be a good way to get acquainted with it. I'm working on ipfs-deploy
at the moment and need some things from js-ipfsd-ctl
that I want to contribute back too, so it'll probably take me some time to get around to this issue. If more people show interest I can bump its priority in my queue.
Given the age of this issue, you can probably take your time.
would be nice if the headers of the http request to a
/ipns/...
path showed the resolution steps: