Skip to content

Commit

Permalink
gateway index: fix check for displaying CID.
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Steven Allen <[email protected]>
  • Loading branch information
Stebalien committed Jan 4, 2019
1 parent 142a615 commit de2b121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit de2b121

Please sign in to comment.