use r.Host

This commit is contained in:
AJ ONeal 2020-11-05 02:40:19 -07:00
parent 9f3f599bf3
commit 5deeab6fe2
1 changed files with 1 additions and 2 deletions

View File

@ -35,8 +35,7 @@ func routeStatic() chi.Router {
r.Get("/.well-known/acme-challenge/{token}", func(w http.ResponseWriter, r *http.Request) { r.Get("/.well-known/acme-challenge/{token}", func(w http.ResponseWriter, r *http.Request) {
//token := chi.URLParam(r, "token") //token := chi.URLParam(r, "token")
host := r.Header.Get("Host") host := r.Host
if strings.ContainsAny(host, "/:|\\") { if strings.ContainsAny(host, "/:|\\") {
host = "" host = ""
} }