Created
June 15, 2012 15:32
-
-
Save yohang/2937052 to your computer and use it in GitHub Desktop.
Varnish configuration file - Not working
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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