Permalink
Browse files

modified varnish config to allow post/page previews

  • Loading branch information...
okor committed Sep 28, 2012
1 parent 13491da commit 950f22ea582c0b091eace4c2a542edb939a754a8
Showing with 5 additions and 2 deletions.
  1. +5 −2 configs/default.vcl
View
@@ -2,16 +2,19 @@ backend default {
.host = "127.0.0.1";
.port = "8080";
}
+
# Drop any cookies sent to Wordpress.
+# except when previewing
sub vcl_recv {
- if (!(req.url ~ "wp-(login|admin)")) {
+ if ( !(req.url ~ "(wp-login|wp-admin|preview=true)") ) {
unset req.http.cookie;
}
}
# Drop any cookies Wordpress tries to send back to the client.
+# except when previewing
sub vcl_fetch {
- if (!(req.url ~ "wp-(login|admin)")) {
+ if ( !(req.url ~ "(wp-login|wp-admin|preview=true)") ) {
unset beresp.http.set-cookie;
}
}

0 comments on commit 950f22e

Please sign in to comment.