I’ve got HAproxy set up for a WE app with the help of John Joyce instructions for load balancing.
HAproxy sets a cookie called “serverid” that contains the proxy node the user is connected to as shown in the image below.
I’m trying to get that value from the app by using:
s = Session.Cookies.Value("serverid")
This returns nothing at all. I guess it’s because the app itself did not set this cookie value?
Any ideas on how to retrieve the value from “serverid”?
In the Session.HashTagChanged event I treat it with care
If someone needs it.
// Please acknowledge use of this code by including this header.
var re = new RegExp(name + "=([^;]+)");
var value = re.exec(document.cookie);
return (value != null) ? unescape(value) : null;
Call the funktion with:
Then you can get the value of the cookie in Session.HashTagChanged event.