From 5deeab6fe20d88f6881691518a5b17f8eac33b99 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 5 Nov 2020 02:40:19 -0700 Subject: [PATCH] use r.Host --- cmd/mgmt/route.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/mgmt/route.go b/cmd/mgmt/route.go index b654bd0..763586d 100644 --- a/cmd/mgmt/route.go +++ b/cmd/mgmt/route.go @@ -35,8 +35,7 @@ func routeStatic() chi.Router { r.Get("/.well-known/acme-challenge/{token}", func(w http.ResponseWriter, r *http.Request) { //token := chi.URLParam(r, "token") - host := r.Header.Get("Host") - + host := r.Host if strings.ContainsAny(host, "/:|\\") { host = "" }