r1499 - trunk/varnish-cache/etc

ssm at projects.linpro.no ssm at projects.linpro.no
Tue Jun 5 17:46:08 CEST 2007


Author: ssm
Date: 2007-06-05 17:46:07 +0200 (Tue, 05 Jun 2007)
New Revision: 1499

Modified:
   trunk/varnish-cache/etc/zope-plone.vcl
Log:
* Move PURGE to a place where it does some good

* Make http auth work



Modified: trunk/varnish-cache/etc/zope-plone.vcl
===================================================================
--- trunk/varnish-cache/etc/zope-plone.vcl	2007-06-04 19:10:16 UTC (rev 1498)
+++ trunk/varnish-cache/etc/zope-plone.vcl	2007-06-05 15:46:07 UTC (rev 1499)
@@ -20,25 +20,25 @@
 
 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;
 }
 




More information about the varnish-commit mailing list