gateway index: fix check for displaying CID.
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
Steven Allen committed
Jan 3, 2019 at 17:00 UTC
65fc4b45e9f74fdc42ec60a2ae89d8487aa9ce59
1 file changed
+1
-1
core/corehttp/gateway_handler.go
+1
-1
@@ -348,7 +348,7 @@ func (i *gatewayHandler) getOrHeadHandler(ctx context.Context, w http.ResponseWr
348
}
349
350
var hash string
351
- if !strings.Contains(originalUrlPath, "ipfs") {
351
+ if !strings.HasPrefix(originalUrlPath, ipfsPathPrefix) {
352
hash = resolvedPath.Cid().String()
353
}
354