<div dir="ltr">Thanks for your answer. Worked great for me..</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 11, 2014 at 10:10 AM, Francis Daly <span dir="ltr"><<a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Jun 11, 2014 at 12:46:41AM -0700, Kunal Pariani wrote:<br>
<br>
Hi there,<br>
<div class=""><br>
> Am wondering if there is a way to proxy (i.e proxy_pass inside location<br>
> directive) to different set of upstreams based on whether a particular<br>
> cookie is present or not in a http request header.<br>
<br>
</div>You can use a map (<a href="http://nginx.org/r/map" target="_blank">http://nginx.org/r/map</a>)<br>
to set a variable based on a cookie<br>
(<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#variables" target="_blank">http://nginx.org/en/docs/http/ngx_http_core_module.html#variables</a>),<br>
and you can use a variable in your proxy_pass directive<br>
(<a href="http://nginx.org/r/proxy_pass" target="_blank">http://nginx.org/r/proxy_pass</a>).<br>
<br>
So it looks like it should Just Work.<br>
<span class="HOEnZb"><font color="#888888"><br>
f<br>
--<br>
Francis Daly <a href="mailto:francis@daoine.org">francis@daoine.org</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>