fix: more deterministic 'what'

This commit is contained in:
Mikaël Cluseau 2018-11-16 14:33:30 +11:00
parent 7f331cb9c6
commit 2c0f4d876e

View File

@ -7,7 +7,6 @@ import (
"log" "log"
"net" "net"
"net/http" "net/http"
"path"
"regexp" "regexp"
"strings" "strings"
@ -45,7 +44,7 @@ func serveHostByIP(w http.ResponseWriter, r *http.Request) {
return return
} }
what := path.Base(r.URL.Path) what := strings.TrimLeft(r.URL.Path, "/")
renderHost(w, r, what, host, cfg) renderHost(w, r, what, host, cfg)
} }