Another attempt to get stick sessions right.
This commit is contained in:
parent
8858d1552d
commit
4004fe8956
|
@ -177,11 +177,12 @@ backend {{ srv.acl_name }}_bck
|
|||
{% endif %}
|
||||
{% if srv.stick_sessions %}
|
||||
{% if srv.stick_on_cookie %}
|
||||
cookie {{ srv.stick_cookie }}
|
||||
dynamic-cookie-key MYKEY
|
||||
cookie {{ srv.stick_cookie }} dynamic
|
||||
{% else %}
|
||||
stick on src
|
||||
stick-table {{ srv.stick_table }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
server-template {{ srv.service_name }}- {{ srv.service_replica_num }} {{ srv.stack_name }}_{{ srv.service_name }}:{{ srv.service_port }} {{ srv.backend_options | default('') }} {% if srv.http_check_enabled is defined and srv.http_check_enabled %}check{% endif %} {% if srv.stick_sessions %}{% if srv.stick_on_cookie %} cookie {{ srv.service_name }}{{ loop.index }}{% endif %}{% endif %} resolvers docker init-addr libc,none
|
||||
server-template {{ srv.service_name }}- {{ srv.service_replica_num }} {{ srv.stack_name }}_{{ srv.service_name }}:{{ srv.service_port }} {{ srv.backend_options | default('') }} {% if srv.http_check_enabled is defined and srv.http_check_enabled %}check{% endif %} resolvers docker init-addr libc,none
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue