Skip to content

Instantly share code, notes, and snippets.

@kevburnsjr
Created May 28, 2013 21:44
Show Gist options
  • Save kevburnsjr/5666407 to your computer and use it in GitHub Desktop.
Save kevburnsjr/5666407 to your computer and use it in GitHub Desktop.

Revisions

  1. kevburnsjr created this gist May 28, 2013.
    11 changes: 11 additions & 0 deletions bandit.vcl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    sub vcl_fetch {
    if (beresp.status >= 200 && beresp.status < 400
    && (req.request == "PUT" || req.request == "POST" || req.request == "DELETE")
    && beresp.http.x-inv) {
    ban("obj.http.x-inv-by ~ " + beresp.http.x-inv);
    }
    }
    sub vcl_deliver {
    unset resp.http.x-inv-by;
    unset resp.http.x-inv;
    }