summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-06-17 18:33:55 +0100
committertechknowlogick <hello@techknowlogick.com>2019-06-17 13:33:55 -0400
commiteaa3a1db4ee0400a30c9eaabe5080b234f9f4053 (patch)
tree1cd9b3c4fe05f039efcd0b5b821e326f171e4e67 /cmd
parent1e8a6164262bafd6878269b153c43686977c4603 (diff)
downloadgitea-eaa3a1db4ee0400a30c9eaabe5080b234f9f4053.tar.gz
gitea-eaa3a1db4ee0400a30c9eaabe5080b234f9f4053.zip
Use certmanager provided TLSConfig for LetsEncrypt (#7229)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go
index e211674b4d..d8bcba76d1 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -5,7 +5,6 @@
package cmd
import (
- "crypto/tls"
"fmt"
"net"
"net/http"
@@ -82,11 +81,9 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
}
}()
server := &http.Server{
- Addr: listenAddr,
- Handler: m,
- TLSConfig: &tls.Config{
- GetCertificate: certManager.GetCertificate,
- },
+ Addr: listenAddr,
+ Handler: m,
+ TLSConfig: certManager.TLSConfig(),
}
return server.ListenAndServeTLS("", "")
}