From d8bc5c991e29c5de0c090ff851f6abdf00180a67 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sun, 26 Apr 2020 16:09:02 -0700 Subject: [PATCH] feat: always show the hash Previously, we only showed this /ipns paths. However, knowing the hash of the current directory is useful regardless. --- core/corehttp/gateway_handler.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index f91d42b61..f34bbeb76 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -330,10 +330,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request } } - var hash string - if !strings.HasPrefix(urlPath, ipfsPathPrefix) { - hash = resolvedPath.Cid().String() - } + hash := resolvedPath.Cid().String() // See comment above where originalUrlPath is declared. tplData := listingTemplateData{