I'm using varnish caching and now i want to exclude all the pages that have "MT=1" in header how to exclude from varnish cache ?

i think it would be at /etc/varnish/default.vcl under sub vcl_recv

but what is the syntax ? Thanks



sub vcl_fetch {
  if ( beresp.http.MT == "1" ) {
    set beresp.ttl = 0s;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.