2011年2月16日星期三

Re: Choose upstream based in a cookie

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.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,170775,176001#msg-176001


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论