From 2c0f4d876eaba15f784d226900f03bec8e784979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Cluseau?= Date: Fri, 16 Nov 2018 14:33:30 +1100 Subject: [PATCH] fix: more deterministic 'what' --- cmd/dkl-local-server/http.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/dkl-local-server/http.go b/cmd/dkl-local-server/http.go index 1b8f360..530eb36 100644 --- a/cmd/dkl-local-server/http.go +++ b/cmd/dkl-local-server/http.go @@ -7,7 +7,6 @@ import ( "log" "net" "net/http" - "path" "regexp" "strings" @@ -45,7 +44,7 @@ func serveHostByIP(w http.ResponseWriter, r *http.Request) { return } - what := path.Base(r.URL.Path) + what := strings.TrimLeft(r.URL.Path, "/") renderHost(w, r, what, host, cfg) }