Skip to content

Instantly share code, notes, and snippets.

@yohang
Created June 15, 2012 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yohang/2937052 to your computer and use it in GitHub Desktop.
Save yohang/2937052 to your computer and use it in GitHub Desktop.
Varnish configuration file - Not working
backend default {
.host = "127.0.0.1";
.port = "80";
}
sub vcl_recv {
set req.http.Surrogate-Capability = "abc=ESI/1.0";
}
sub vcl_fetch {
if (beresp.http.Surrogate-Control ~ "ESI/1.0") {
unset beresp.http.Surrogate-Control;
set beresp.do_esi = true;
}
if (beresp.http.Cache-Control ~ "s-maxage") {
unset req.http.Cookie;
return (deliver);
}
return (hit_for_pass);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment