diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg
index 9feb86d5823e715d56fe19410bf10c6116047f17..d0cc111bb72d0fe51e700b69efe3c05b1eb03370 100644
--- a/stack/erp5/buildout.cfg
+++ b/stack/erp5/buildout.cfg
@@ -355,7 +355,7 @@ md5sum = 399ea8b0b8bdcc63d7295351445a863a
 [template-haproxy-cfg]
 < = download-base
 filename = haproxy.cfg.in
-md5sum = 392e5aabb0b873890d4d070e5a25f51e
+md5sum = 7ee391d6a79ff14f23d6c4631469997c
 
 [bt5-repository]
 # Format:
diff --git a/stack/erp5/haproxy.cfg.in b/stack/erp5/haproxy.cfg.in
index 6fef92970e8a4f58bbf40d297f3aa88e852edc8e..c4d23b2caf592966ae3cec05f7721891002e1a61 100644
--- a/stack/erp5/haproxy.cfg.in
+++ b/stack/erp5/haproxy.cfg.in
@@ -11,7 +11,6 @@ defaults
   retries 1
   option redispatch
   maxconn 2000
-  cookie SERVERID insert nocache postonly
   balance roundrobin
   stats uri /haproxy
   stats realm Global\ statistics
@@ -37,6 +36,9 @@ defaults
 
 {% for name, (port, backend_list) in parameter_dict['backend-dict'].items() -%}
 listen {{ name }} {{ parameter_dict['ip'] }}:{{ port }}
+  cookie SERVERID rewrite
+  http-request set-header X-Balancer-Current-Cookie SERVERID
+  http-send-name-header X-Balancer-Current-Server
 {%   set has_webdav = [] -%}
 {%   for address, connection_count, webdav in backend_list -%}
 {%     if webdav %}{% do has_webdav.append(None) %}{% endif -%}