Passing variable data to ESI requests

Guilhaume Bordiau gbordiau at
Thu Nov 8 11:41:34 CET 2012


We're using Varnish since a few weeks but are facing the issue of using
dynamic content inside cached pages.
We tried ESI for that but it appears that there's no way to pass some (or
all) of the original request elements (headers, cookies) to the ESI request
made toward our server.

We implemented hacks through cookies read from javascript, triggering ajax
requests, but we're facing maintainability issues around browsers refusing
cookies (our app run in an iframe and domains are different from the top

So we're starting to think of developing the missing part of code in
Varnish that could make it do what we need:
Allow to pass the original request headers and cookies to the ESI URI
contained in a cached page.

So my questions are:
- Can you confirm that's it's currently not possible?
- What would be the amount of work to achieve this?
- Any tips to help me getting started with this?

Much thanks in advance to all.

Guilhaume Bordiau.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-dev mailing list