respond with 503 on empty backend
This commit is contained in:
parent
16609cd485
commit
074b31b5e9
5 changed files with 275 additions and 3 deletions
|
@ -744,6 +744,7 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo
|
|||
log.Debugf("Setting up backend health check %s", *hcOpts)
|
||||
backendsHealthcheck[frontend.Backend] = healthcheck.NewBackendHealthCheck(*hcOpts)
|
||||
}
|
||||
lb = middlewares.NewEmptyBackendHandler(rebalancer, lb)
|
||||
case types.Wrr:
|
||||
log.Debugf("Creating load-balancer wrr")
|
||||
if stickysession {
|
||||
|
@ -764,6 +765,7 @@ func (server *Server) loadConfig(configurations configs, globalConfiguration Glo
|
|||
log.Debugf("Setting up backend health check %s", *hcOpts)
|
||||
backendsHealthcheck[frontend.Backend] = healthcheck.NewBackendHealthCheck(*hcOpts)
|
||||
}
|
||||
lb = middlewares.NewEmptyBackendHandler(rr, lb)
|
||||
}
|
||||
|
||||
if len(frontend.Errors) > 0 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue