0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 10:14:05 +01:00

Use certmanager provided TLSConfig for LetsEncrypt (#7229)

This commit is contained in:
zeripath 2019-06-17 18:33:55 +01:00 committed by techknowlogick
parent 1e8a616426
commit eaa3a1db4e

View file

@ -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("", "")
}