configuring Varnish

Hugo Cisneiros (Eitch) hugo.cisneiros at gmail.com
Tue Jan 3 14:40:51 CET 2012


On Tue, Jan 3, 2012 at 12:11 AM, charles ilogu <tochi2k at hotmail.com> wrote:
> Does anyone know how i can configure varnish vcl file so that it does not
> ban .css and .js files when i issue a BAN?

Before the ban() function, something like this:

if (req.request == "BAN") {

  # Deny ban on css and js extensions
  if (req.url ~ "\.(css|js)$") {
    error 405 "Ban not allowed.";
  }

  ban(...)
}

Source:
https://www.varnish-cache.org/docs/trunk/tutorial/purging.html

-- 
[]'s
Hugo
www.devin.com.br



More information about the varnish-misc mailing list