Fix log when default TLSStore and TLSOptions are defined multiple times
This commit is contained in:
parent
4cb5825d11
commit
31a93d5045
1 changed files with 2 additions and 2 deletions
|
@ -122,14 +122,14 @@ func mergeConfiguration(configurations dynamic.Configurations, defaultEntryPoint
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(defaultTLSStoreProviders) > 1 {
|
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)
|
delete(conf.TLS.Stores, tls.DefaultTLSStoreName)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(defaultTLSOptionProviders) == 0 {
|
if len(defaultTLSOptionProviders) == 0 {
|
||||||
conf.TLS.Options[tls.DefaultTLSConfigName] = tls.DefaultTLSOptions
|
conf.TLS.Options[tls.DefaultTLSConfigName] = tls.DefaultTLSOptions
|
||||||
} else if len(defaultTLSOptionProviders) > 1 {
|
} 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,
|
// 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.
|
// i.e. routers depending on this missing TLS option will fail to initialize as well.
|
||||||
delete(conf.TLS.Options, tls.DefaultTLSConfigName)
|
delete(conf.TLS.Options, tls.DefaultTLSConfigName)
|
||||||
|
|
Loading…
Reference in a new issue