Setting a variable/header in vcl_recv and checking it in other sub routines
Guillaume Quintard
guillaume at varnish-software.com
Mon Apr 9 09:16:49 UTC 2018
Hi,
Use vmod_var, from varnish-modules. You'll store variables without setting
headers.
--
Guillaume Quintard
On Mon, Apr 9, 2018 at 11:12 AM, Md. Golam Hossain <mghhimu at gmail.com>
wrote:
> If I want to make some decision by checking some header(eg:
> req.http.test) in vcl_backend_response being set in vcl_recv but not
> sent as http header while fetching from backend or while sending
> response to client, how should I do this?
>
> Let's say, I want to store all the objects that is set to 'true' in
> req.http.test header in vcl_recv and check it in vcl_backend_beresponse
> to store that object in "test.storage". But, as I am unsetting the
> header(bereq.http.test) in vcl_backend_fetch, it can't be used in
> vcl_backend_response while setting storage hint.
>
> Any suggestion?
> Thanks in advance.
>
>
> On Mon, Apr 9, 2018, 11:00 Md. Golam Hossain <mghhimu at gmail.com> wrote:
>
>> If I want to make some decision by checking some header(eg:
>> req.http.test) in vcl_backend_response being set in vcl_recv but not
>> sent as http header while fetching from backend or while sending
>> response to client, how should I do this?
>>
>> Let's say, I want to store all the objects that is set to 'true' in
>> req.http.test header in vcl_recv and check it in vcl_backend_beresponse
>> to store that object in "test.storage". But, as I am unsetting the
>> header(bereq.http.test) in vcl_backend_fetch, it can't be used in
>> vcl_backend_response while setting storage hint.
>>
>> Any suggestion?
>> Thanks in advance.
>>
>>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180409/5ba5540d/attachment.html>
More information about the varnish-misc
mailing list