diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 11d353a23..6ea7b906f 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -3,7 +3,6 @@ package corehttp import ( "errors" "fmt" - "html/template" "io" "net/http" gopath "path" @@ -30,9 +29,8 @@ const ( // gatewayHandler is a HTTP handler that serves IPFS objects (accessible by default at /ipfs/) // (it serves requests like GET /ipfs/QmVRzPKPzNtSrEzBFm2UZfxmPAgnaLke4DMcerbsGGSaFe/link) type gatewayHandler struct { - node *core.IpfsNode - dirList *template.Template - config GatewayConfig + node *core.IpfsNode + config GatewayConfig } func newGatewayHandler(node *core.IpfsNode, conf GatewayConfig) (*gatewayHandler, error) { diff --git a/core/corehttp/gateway_indexPage.go b/core/corehttp/gateway_indexPage.go index 242e1ac20..79ad935b1 100644 --- a/core/corehttp/gateway_indexPage.go +++ b/core/corehttp/gateway_indexPage.go @@ -22,65 +22,65 @@ type directoryItem struct { var listingTemplate = template.Must(template.New("dir").Funcs(template.FuncMap{"iconFromExt": iconFromExt}).Parse(` - - - - - - - - {{ .Path }} - - - -
-
-
-
- Index of {{ .Path }} -
- - - - - - - {{ range .Listing }} - - - - - - {{ end }} -
-
 
-
- .. -
-
 
-
- {{ .Name }} - {{ .Size }} bytes
-
-
- + + + + + + + + {{ .Path }} + + + +
+
+
+
+ Index of {{ .Path }} +
+ + + + + + + {{ range .Listing }} + + + + + + {{ end }} +
+
 
+
+ .. +
+
 
+
+ {{ .Name }} + {{ .Size }} bytes
+
+
+ `))