* Move PURGE to a place where it does some good

* Make http auth work



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1499 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b636e251
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment