fix wrong config generation when upstream-hash-by is set (#2215)

This commit is contained in:
Elvin Efendi 2018-03-19 16:37:51 -04:00 committed by Manuel Alejandro de Brito Fontes
parent 08252e2eef
commit df50487a35

View file

@ -287,7 +287,7 @@ func buildLoadBalancingConfig(b interface{}, fallbackLoadBalancing string) strin
}
if backend.UpstreamHashBy != "" {
return "hash {{ $upstream.UpstreamHashBy }} consistent;"
return fmt.Sprintf("hash %s consistent;", backend.UpstreamHashBy)
}
if backend.LoadBalancing != "" {