<div dir="ltr"><div><div><div>Hi,<br><br>Would it be possible to add this as new feature?<br><br></div>Is there some other alternative ? Actually based on this header value I want to select named based location. <br><br><br>
</div>Thanks,<br></div>Makailol<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 27, 2014 at 5:02 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div class=""><br>
On Thu, Mar 27, 2014 at 03:01:22PM +0530, Makailol Charls wrote:<br>
<br>
> Hi Maxim,<br>
><br>
> Apart from passing cache status to backend, would it be possible to send<br>
> some other headers which are stored in cache?<br>
><br>
> For example, If backed sets header "Foo : Bar" , which is stored in cache.<br>
> Now when cache is expired , request will be sent to backend. At that time<br>
> can we send the value of Foo header stored in cache to upstream backend?<br>
><br>
> I tried to achieve this with below code but it could not work.<br>
> proxy_set_header Foo $upstream_http_Foo;<br>
><br>
> Would you suggest me how to achieve this or what am I doing wrong here.<br>
<br>
</div>This is not something possible.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks,<br>
> Makailol<br>
><br>
><br>
><br>
><br>
> On Thu, Mar 20, 2014 at 6:56 PM, Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>> wrote:<br>
><br>
> > Hello!<br>
> ><br>
> > On Thu, Mar 20, 2014 at 09:38:40AM +0530, Makailol Charls wrote:<br>
> ><br>
> > > Hi,<br>
> > ><br>
> > > Is there some way to achieve this? I want to pass requests to backend<br>
> > based<br>
> > > on cache status condition.<br>
> ><br>
> > This is not something easily possible, as cache status is only<br>
> > known after we started processing proxy_pass and already know<br>
> > which backend will be used. (Note that by default proxy_cache_key<br>
> > uses $proxy_host, which wouldn't be known otherwise.)<br>
> ><br>
> > If you want to check BYPASS as in your previous message, I would<br>
> > recommend checking relevant conditions from proxy_cache_bypass<br>
> > separately. As a more generic though less effective aproach, an<br>
> > additional proxy layer may be used.<br>
> ><br>
> > --<br>
> > Maxim Dounin<br>
> > <a href="http://nginx.org/" target="_blank">http://nginx.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>
> ><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>
<br>
<br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.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>
</div></div></blockquote></div><br></div>