fix wrong config generation when upstream-hash-by is set

This commit is contained in:
Elvin Efendi 2018-03-19 16:15:44 -04:00
parent 08252e2eef
commit f53dfe5d08

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 != "" {