-
-
Save tadas-s/5918749 to your computer and use it in GitHub Desktop.
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.2"; | |
.port = "80"; | |
} | |
sub vcl_recv { | |
set req.backend = default; | |
return(lookup); | |
} | |
sub vcl_miss { | |
return(fetch); | |
} | |
sub vcl_hit { | |
return(deliver); | |
} | |
sub vcl_fetch { | |
if (obj.status != 200 && obj.status != 403 && obj.status != 404 && obj.status != 301 && obj.status != 302) { | |
restart; | |
} | |
set beresp.ttl = 24h; | |
set beresp.http.X-Cacheable = "YES"; | |
unset beresp.http.Vary; | |
return(deliver); | |
} | |
sub vcl_deliver { | |
return(deliver); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment