Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created November 8, 2016 07:38
Show Gist options
  • Save ccapndave/2baa6cc2d32bd04362979985bd3032e6 to your computer and use it in GitHub Desktop.
Save ccapndave/2baa6cc2d32bd04362979985bd3032e6 to your computer and use it in GitHub Desktop.
vcl 4.0;
# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "3001";
}
# This forces us to cache origin responses forever (since we are manually invalidating the cache)
sub vcl_backend_response {
if (beresp.http.Cache-Control == "no-cache") {
set beresp.http.Cache-Control = "public, max-age=31556926";
unset beresp.http.ETag;
unset beresp.http.If-None-Match;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment