]> err.no Git - varnish/commitdiff
* Move PURGE to a place where it does some good
authorssm <ssm@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 5 Jun 2007 15:46:07 +0000 (15:46 +0000)
committerssm <ssm@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 5 Jun 2007 15:46:07 +0000 (15:46 +0000)
* Make http auth work

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1499 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/etc/zope-plone.vcl

index 23f7568b612863b78a192497a58c3d6d4b68dbb4..ab3f1143dd592b97505cbe77338632750d74ce45 100644 (file)
@@ -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;
 }