Skip to content

Instantly share code, notes, and snippets.

@nzoschke
Created January 5, 2010 00:15
Show Gist options
  • Save nzoschke/269018 to your computer and use it in GitHub Desktop.
Save nzoschke/269018 to your computer and use it in GitHub Desktop.
diff --git a/skel/heroku.vcl b/skel/heroku.vcl
index 4b74b22..56280e1 100644
--- a/skel/heroku.vcl
+++ b/skel/heroku.vcl
@@ -62,6 +62,9 @@ sub vcl_recv {
# serve stale items for 30 seconds while fetching new item from backend
set req.grace = 30s;
+ # remove the cookie header for cached pages
+ unset req.http.cookie;
+
return (lookup);
}
@@ -69,6 +72,10 @@ sub vcl_fetch {
# cache 200s set to cache public
if (obj.cacheable && obj.http.Cache-Control ~ "public") {
set obj.prefetch = -30s;
+
+ # remove the set-cookie header for cached pages
+ unset obj.http.set-cookie;
+
return (deliver);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment