server/server.go: use TLS config provided by acme/autocert (#567)

Suggestion based on go docs of acme autocert.
This commit is contained in:
Stefan Benten 2023-06-20 20:07:19 +02:00 committed by GitHub
parent 45e2654036
commit 891ef14cfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -274,9 +274,8 @@ func UseLetsEncrypt(hosts []string) OptionFn {
},
}
srvr.tlsConfig = &tls.Config{
GetCertificate: m.GetCertificate,
}
srvr.tlsConfig = m.TLSConfig()
srvr.tlsConfig.GetCertificate = m.GetCertificate
}
}