Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible properties of Varnish objects

Tags:

varnish

I can not for the life of me find any documentation regarding the possible properties of varnish (version 3) objects.

We know (from googling, varnish documentation just mumbles and leaves you more frustrated) for example that the request object has the url property (req.url) and also that it has req.http.X-Forwarded-For. But has anyone ever in any way found... say... a list?

Thanks!

/joakim

like image 756
user2072216 Avatar asked Feb 14 '13 13:02

user2072216


1 Answers

You can't really give a comprehensive list of things like req.http.X-Forwarded-For because req.http.* are HTTP headers. The Cookie header of a request will be req.http.Cookie and the User-Agent header will be req.http.User-Agent. There are a lot of standard headers, but you can set any arbitrary header and it will show up in req.http.___________. You can see the headers of the HTTP response in resp.http.*. Same for backend response in beresp.http.*.

All of the other properties are listed here: https://www.varnish-cache.org/docs/3.0/reference/vcl.html#variables

like image 123
nickgroenke Avatar answered Jan 03 '23 12:01

nickgroenke