gateway index: fix check for displaying CID.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen 2019-01-03 17:00:55 -08:00
parent 9ef1486307
commit 65fc4b45e9

View File

@ -348,7 +348,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
}
var hash string
if !strings.Contains(originalUrlPath, "ipfs") {
if !strings.HasPrefix(originalUrlPath, ipfsPathPrefix) {
hash = resolvedPath.Cid().String()
}