From: ssm Date: Tue, 5 Jun 2007 15:46:07 +0000 (+0000) Subject: * Move PURGE to a place where it does some good X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ff853038b4d67c2ff1ee2e358e3474035ea4aa2;p=varnish * Move PURGE to a place where it does some good * Make http auth work git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1499 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/etc/zope-plone.vcl b/varnish-cache/etc/zope-plone.vcl index 23f7568b..ab3f1143 100644 --- a/varnish-cache/etc/zope-plone.vcl +++ b/varnish-cache/etc/zope-plone.vcl @@ -20,25 +20,25 @@ acl purge { sub vcl_recv { if (req.request != "GET" && req.request != "HEAD") { + # PURGE request if zope asks nicely + if (req.request == "PURGE") { + if (!client.ip ~ purge) { + error 405 "Not allowed."; + } + lookup; + } pipe; } if (req.http.Expect) { pipe; } - if (req.http.Authenticate) { + if (req.http.Authenticate || req.http.Authorization) { pass; } # We only care about the "__ac.*" cookies, used for authentication if (req.http.Cookie && req.http.Cookie ~ "__ac(|_(name|password|persistent))=") { pass; } - # PURGE request if zope asks nicely - if (req.request == "PURGE") { - if (!client.ip ~ purge) { - error 405 "Not allowed."; - } - lookup; - } lookup; }