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);
}
Written by Matthew Daly
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Varnish
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#