Enable http-01 challenge

This commit is contained in:
Sergey Stepanov 2021-08-26 11:58:26 +03:00
parent 7c7b0c53a9
commit 25483b27b3
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B

View file

@ -132,10 +132,12 @@ func (s *Server) redirection() (*Server, error) {
log.Printf("Redirect: http://%s%s -> %s", r.Host, r.URL.String(), rdr)
http.Redirect(w, r, rdr, http.StatusFound)
}))
// do we need this after all?
//if serv.autoCert != nil {
// return serv.autoCert.HTTPHandler(h)
//}
if serv.autoCert != nil {
return serv.autoCert.HTTPHandler(h)
}
return h
})
log.Printf("Starting HTTP->HTTPS redirection server on %s", srv.Addr)