Question

We're trying to configure our sites running D7 to use ESIs with Varnish 2.1.5, and having a hard time figuring this out.

We have a file /test.php that is being included in the template via esi so it appears on all pages of our site. The call to the file is through (in the template)

<esi:include src="/test.php" />

Relevant vcl conf is:

sub vcl_fetch {
...
  // enable esi
  esi;
  // if url is test.php, set ttl to 15 s
  if (req.url == "/test.php") {
    unset beresp.http.set-cookie;
    set beresp.ttl = 15s;
  }
}

The text from test.php appears when users are logged in, but does not appear when they are logged out -- which is what we're after. This is without the ESI module as that is for authenticated users.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top