message: refactor drupal varnish to support PURGE for Drupal 7
diff: @@ -95,7 +95,7 @@ sub vcl_recv {
  }
  # Only allow BAN requests from IP addresses in the 'purge' ACL.
  - if (req.method == "BAN") {
  + if (req.method == "BAN" || req.method == "URIBAN" || req.method == "PURGE") {
  # Only allow BAN from defined ACL
  if (!client.ip ~ purge) {
  return (synth(403, "Your IP is not allowed."));
  @@ -107,22 +107,24 @@ sub vcl_recv {
  return (synth(403, "BAN only allowed from within own network."));
  }
  + if (req.method == "BAN") {
  # Logic for the ban, using the Cache-Tags header.
  if (req.http.Cache-Tags) {
  ban("obj.http.Cache-Tags ~ " + req.http.Cache-Tags);
  + # Throw a synthetic page so the request won't go to the backend.
  + return (synth(200, "Ban added."));
  }
  else {
  return (synth(403, "Cache-Tags header missing."));
  }
  + }
  + if (req.method == "URIBAN" || req.method == "PURGE") {
  + ban("req.url == " + req.url);
  # Throw a synthetic page so the request won't go to the backend.
  return (synth(200, "Ban added."));
  }
  - if (req.method == "URIBAN") {
  - ban("req.http.host == " + req.http.host + " && req.url == " + req.url);
  - # Throw a synthetic page so the request won't go to the backend.
  - return (synth(200, "Ban added."));
  }
  # Non-RFC2616 or CONNECT which is weird, we pipe that
  