Setting a variable/header in vcl_recv and checking it in other sub routines
Md. Golam Hossain
mghhimu at gmail.com
Mon Apr 9 09:12:07 UTC 2018
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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20180409/413e0dcb/attachment.html>
More information about the varnish-misc
mailing list