From 25483b27b338cea7dbc15fcdb00296f4f9c29ce5 Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Thu, 26 Aug 2021 11:58:26 +0300 Subject: [PATCH] Enable http-01 challenge --- pkg/network/httpx/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/network/httpx/server.go b/pkg/network/httpx/server.go index f97a80ca..ac2244c8 100644 --- a/pkg/network/httpx/server.go +++ b/pkg/network/httpx/server.go @@ -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)