Skip to content

Commit

Permalink
Don't remove static certs from config when cluster mode
Browse files Browse the repository at this point in the history
  • Loading branch information
juliens authored and traefiker committed Sep 28, 2018
1 parent 7033b99 commit 1d8bdd4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1d8bdd4

Please sign in to comment.