mirror of
https://github.com/containous/traefik.git
synced 2024-12-22 13:34:03 +03:00
Fix log when default TLSStore and TLSOptions are defined multiple times
This commit is contained in:
parent
4cb5825d11
commit
31a93d5045
@ -122,14 +122,14 @@ func mergeConfiguration(configurations dynamic.Configurations, defaultEntryPoint
|
||||
}
|
||||
|
||||
if len(defaultTLSStoreProviders) > 1 {
|
||||
log.WithoutContext().Errorf("Default TLS Stores defined multiple times in %v", defaultTLSOptionProviders)
|
||||
log.WithoutContext().Errorf("Default TLS Store defined in multiple providers: %v", defaultTLSStoreProviders)
|
||||
delete(conf.TLS.Stores, tls.DefaultTLSStoreName)
|
||||
}
|
||||
|
||||
if len(defaultTLSOptionProviders) == 0 {
|
||||
conf.TLS.Options[tls.DefaultTLSConfigName] = tls.DefaultTLSOptions
|
||||
} else if len(defaultTLSOptionProviders) > 1 {
|
||||
log.WithoutContext().Errorf("Default TLS Options defined multiple times in %v", defaultTLSOptionProviders)
|
||||
log.WithoutContext().Errorf("Default TLS Options defined in multiple providers %v", defaultTLSOptionProviders)
|
||||
// We do not set an empty tls.TLS{} as above so that we actually get a "cascading failure" later on,
|
||||
// i.e. routers depending on this missing TLS option will fail to initialize as well.
|
||||
delete(conf.TLS.Options, tls.DefaultTLSConfigName)
|
||||
|
Loading…
Reference in New Issue
Block a user