fix: consider UDP when checking for empty config
This commit is contained in:
parent
f55a09862e
commit
2171cb7f3d
1 changed files with 5 additions and 1 deletions
|
@ -241,10 +241,14 @@ func isEmptyConfiguration(conf *dynamic.Configuration) bool {
|
||||||
if conf.HTTP == nil {
|
if conf.HTTP == nil {
|
||||||
conf.HTTP = &dynamic.HTTPConfiguration{}
|
conf.HTTP = &dynamic.HTTPConfiguration{}
|
||||||
}
|
}
|
||||||
|
if conf.UDP == nil {
|
||||||
|
conf.UDP = &dynamic.UDPConfiguration{}
|
||||||
|
}
|
||||||
|
|
||||||
httpEmpty := conf.HTTP.Routers == nil && conf.HTTP.Services == nil && conf.HTTP.Middlewares == nil
|
httpEmpty := conf.HTTP.Routers == nil && conf.HTTP.Services == nil && conf.HTTP.Middlewares == nil
|
||||||
tlsEmpty := conf.TLS == nil || conf.TLS.Certificates == nil && conf.TLS.Stores == nil && conf.TLS.Options == nil
|
tlsEmpty := conf.TLS == nil || conf.TLS.Certificates == nil && conf.TLS.Stores == nil && conf.TLS.Options == nil
|
||||||
tcpEmpty := conf.TCP.Routers == nil && conf.TCP.Services == nil
|
tcpEmpty := conf.TCP.Routers == nil && conf.TCP.Services == nil
|
||||||
|
udpEmpty := conf.UDP.Routers == nil && conf.UDP.Services == nil
|
||||||
|
|
||||||
return httpEmpty && tlsEmpty && tcpEmpty
|
return httpEmpty && tlsEmpty && tcpEmpty && udpEmpty
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue