From aa80181e328b1100a604761ba1d6672e24596d84 Mon Sep 17 00:00:00 2001 From: Fluf <36822577+flufmonster@users.noreply.github.com> Date: Sat, 21 Jul 2018 19:42:34 -0400 Subject: [PATCH] allow listen to other ports for redir --- cmd/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/web.go b/cmd/web.go index c3f20b660..499172121 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -80,7 +80,7 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler) Cache: autocert.DirCache(directory), Email: email, } - go http.ListenAndServe(listenAddr+":http", certManager.HTTPHandler(http.HandlerFunc(runLetsEncryptFallbackHandler))) // all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validatio happens here) + go http.ListenAndServe(listenAddr+":"+setting.PortToRedirect, certManager.HTTPHandler(http.HandlerFunc(runLetsEncryptFallbackHandler))) // all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validatio happens here) server := &http.Server{ Addr: listenAddr, Handler: m,