New sticky session configuration

This commit is contained in:
Ricardo Pchevuzinske Katz 2017-02-10 01:33:23 -02:00
parent 1dbe65ecb6
commit 79e186cb77
3 changed files with 11 additions and 18 deletions

View file

@ -185,8 +185,8 @@ http {
{{range $name, $upstream := $backends}}
upstream {{$upstream.Name}} {
{{ if $cfg.EnableStickySessions }}
sticky hash=sha1 httponly;
{{ if $upstream.StickySession.Enabled }}
sticky hash={{$upstream.StickySession.Hash}} route={{$upstream.StickySession.Hash}} httponly;
{{ else }}
least_conn;
{{ end }}