Commit 05fa2654 authored by Roque's avatar Roque

ERPType: cookie crumbler gets server id from server

- server id passed through http headers is no longer used, it cames now from configuration
- this removes complexity at the cost of respecting consistency in names
parent 6d74ba22
......@@ -96,7 +96,9 @@ def balancer_cookie_hook(ob, req, resp):
if balancer_cookie in req.cookies:
resp.expireCookie(balancer_cookie, path=path)
else:
server_id = req['HTTP_X_BALANCER_CURRENT_SERVER']
from product.CMFActivity.ActivityTool import getCurrentNode
server_id = getCurrentNode()
# The format of server_id must be exactly the same for any balancer in front
if server_id != req.cookies.get(balancer_cookie):
resp.setCookie(balancer_cookie, server_id, path=path);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment