mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Use certmanager provided TLSConfig for LetsEncrypt (#7229)
This commit is contained in:
parent
1e8a616426
commit
eaa3a1db4e
@ -5,7 +5,6 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/tls"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -82,11 +81,9 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: listenAddr,
|
Addr: listenAddr,
|
||||||
Handler: m,
|
Handler: m,
|
||||||
TLSConfig: &tls.Config{
|
TLSConfig: certManager.TLSConfig(),
|
||||||
GetCertificate: certManager.GetCertificate,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
return server.ListenAndServeTLS("", "")
|
return server.ListenAndServeTLS("", "")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user