Don't remove static certs from config when cluster mode

This commit is contained in:
SALLEYRON Julien 2018-09-28 17:54:04 +02:00 committed by Traefiker Bot
parent 7033b996c6
commit 1d8bdd4384

View file

@ -480,18 +480,17 @@ func (s *Server) createTLSConfig(entryPointName string, tlsOption *traefiktls.TL
}
} else {
config.GetCertificate = s.serverEntryPoints[entryPointName].getCertificate
}
if len(config.Certificates) != 0 {
certMap := s.buildNameOrIPToCertificate(config.Certificates)
if len(config.Certificates) != 0 {
certMap := s.buildNameOrIPToCertificate(config.Certificates)
if s.entryPoints[entryPointName].CertificateStore != nil {
s.entryPoints[entryPointName].CertificateStore.StaticCerts.Set(certMap)
if s.entryPoints[entryPointName].CertificateStore != nil {
s.entryPoints[entryPointName].CertificateStore.StaticCerts.Set(certMap)
}
}
}
// Remove certs from the TLS config object
config.Certificates = []tls.Certificate{}
// Remove certs from the TLS config object
config.Certificates = []tls.Certificate{}
}
// Set the minimum TLS version if set in the config TOML
if minConst, exists := traefiktls.MinVersion[s.entryPoints[entryPointName].Configuration.TLS.MinVersion]; exists {