Created
August 24, 2014 15:01
-
-
Save hiroakis/1d5706d70c05a5bee1fb to your computer and use it in GitHub Desktop.
This file contains hidden or 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 = "8000"; | |
} | |
sub vcl_recv { | |
if (req.request == "POST") { | |
ban("req.url ~ /"); | |
return(pass); | |
#return(pipe); | |
} | |
return (lookup); | |
} | |
sub vcl_fetch { | |
if (req.request == "GET") { | |
set beresp.ttl = 60s; | |
return (deliver); | |
} else { | |
set beresp.ttl = 0s; | |
return (deliver); | |
} | |
} | |
sub vcl_deliver { | |
if (obj.hits > 0) { | |
set resp.http.X-Sano = "HIT"; | |
} else { | |
set resp.http.X-Sano = "MISS"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment