diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index b850578f4..6b7c15d41 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -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() }