mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix(tls): no certificate available
This commit is contained in:
parent
5864185615
commit
8f7574f212
6 changed files with 41 additions and 6 deletions
4
main.go
4
main.go
|
@ -75,12 +75,14 @@ func Program(confPath string) func(state overseer.State) {
|
|||
GetCertificate: func(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
return cert.GetServerTLSCertificate()
|
||||
},
|
||||
MinVersion: tls.VersionTLS12,
|
||||
}
|
||||
|
||||
srv.TLSConfig = tlsConfig
|
||||
|
||||
logger.Info("Starting HTTPS server")
|
||||
err = srv.ServeTLS(state.Listener, "", "")
|
||||
tlsListener := tls.NewListener(state.Listener, tlsConfig)
|
||||
err = srv.Serve(tlsListener)
|
||||
} else {
|
||||
logger.Info("Starting HTTP server")
|
||||
err = srv.Serve(state.Listener)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue