<div dir="ltr">What about doing something like renaming that header so that the default vcl subroutine won't see it?  Or maybe just always return from your sub-routine so that the default vcl never runs.<div><br></div><div>I use a couple of techniques like what you are describing - where I add GET params on the URL based on a particular header value as well as the inverse (take GET parameters off of the URL so that they are not hashed) and stick those values into a "X-" type header.</div><div><br></div><div>Maybe you can describe your technique in V3 so that we can see how we might do the same in V4.  I'm not an expert on V4 but I have reworked some of the techniques that I have been using in V3 to V4 successfully.</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-weight:bold"><span style="white-space:pre-wrap"><u>                                                                  </u></span></div><div style="color:rgb(0,0,0)"><font face="Helvetica"><span style="font-size:12px">Raymond Jennings III</span></font></div></div><span style="color:rgb(0,0,0);text-align:-webkit-auto;font-family:Helvetica"><font face="Rockwell Extra Bold" style="font-size:19px"><b><a href="http://nytimes.com/" style="color:rgb(17,85,204)" target="_blank">nytimes.com</a></b></font><br></span><div style="color:rgb(0,0,0);font-family:Helvetica"><span style="text-align:-webkit-auto"><span style="font-size:12px;text-align:-webkit-auto"><b><div style="display:inline!important">Office:<span style="font-weight:normal"> <a href="tel:212-556-7786" target="_blank">212.556.7786</a></span></div></b></span><span style="text-align:-webkit-auto"><span style="text-align:-webkit-auto"><b style="font-size:12px;text-align:-webkit-auto"><div>iPhone:<span style="font-weight:normal"> <a href="tel:914-330-5074" target="_blank">914.330.5074</a></span></div><div><b style="font-size:13px">E-mail: </b><a href="mailto:Raymond.Jennings@nytimes.com" style="font-size:13px;font-weight:normal;color:rgb(17,85,204)" target="_blank">Raymond.Jennings@nytimes.com</a><br></div><div>FaceTime:<span style="font-weight:normal"> <a href="mailto:Raymond.Jennings@nytimes.com" style="color:rgb(17,85,204)" target="_blank">Raymond.Jennings@nytimes.com</a></span></div></b></span></span></span></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Apr 6, 2015 at 5:08 PM, Hugo Cisneiros (Eitch) <span dir="ltr"><<a href="mailto:hugo.cisneiros@gmail.com" target="_blank">hugo.cisneiros@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
>From documentation:<br>
<a href="https://www.varnish-cache.org/docs/trunk/users-guide/increasing-your-hitrate.html#authorization" target="_blank">https://www.varnish-cache.org/docs/trunk/users-guide/increasing-your-hitrate.html#authorization</a><br>
<br>
"Authorization<br>
   If Varnish sees an 'Authorization' header it will pass the request.<br>
If this is not what you want you can unset the header."<br>
<br>
I have a scenario that works on varnish3 but won't work on varnish4.<br>
<br>
As the subject says, I want to cache requests that were made with the<br>
Authorization header. Before you start thinking "what a crazy and<br>
insecure thing to do", let me explain:<br>
<br>
I have an internal varnish cache that receives requests from<br>
applications and serve content from an external CDN that is<br>
authenticated (thus the Authorization header). Only internal servers<br>
use it and I do this to save bandwidth. Every possible client knows<br>
and uses the same Authorization header, so caching the requests are<br>
not an issue.<br>
<br>
I'm also trying to use the Authorization header in the hash_data too,<br>
since it's always the same and if someone requests without knowing the<br>
proper pass, varnish won't serve the right cache entry.<br>
<br>
When I use the Authorization header, varnish4 does not cache at all...<br>
And when I remove the Authorization header, it caches but I get 401<br>
Forbidden from the CDN.<br>
<br>
Is there a way to solve this?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
[]'s<br>
Hugo<br>
<a href="http://www.devin.com.br" target="_blank">www.devin.com.br</a><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</font></span></blockquote></div><br></div>