Last Updated: February 25, 2016
·
206
· matthewbdaly

Rules for sub vcl_recv to make Varnish play nice with WooCommerce

 if (req.url ~ "^/(cart|my-account|checkout|addons)") {
    return (pass);
}
if ( req.url ~ "\?add-to-cart=" ) {
    return (pass);
}
if ( req.url ~ "^/wp-(admin|login)" ) {
  return (pass);
}
if ( req.url ~ "wc-api" ) {
  return (pass);
}