Welcome! Log In Create A New Profile

Advanced

Re: Choose upstream based in a cookie

nfn
February 16, 2011 06:10PM
Hello,

Is this the right way to switch backend based in cookies?

[code]
location / {
if ($http_cookie ~* "memberid=") {
proxy_pass http://10.10.10.10;
break;
}
if ($http_cookie ~* "clientid=") {
proxy_pass http://10.10.10.15;
break;
}
proxy_pass http://10.10.10.20;
}
[/code]

Thanks.
Subject Author Posted

Choose upstream based in a cookie

nfn January 30, 2011 06:14AM

Re: Choose upstream based in a cookie

nfn February 16, 2011 06:10PM

Re: Choose upstream based in a cookie

Dayo February 17, 2011 10:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready