ACLs¶
属性创建命名访问控制列表。 acl
关键字。您可以使用匹配运算符将客户端的IP地址与ACL进行匹配。::
# Who is allowed to purge....
acl local {
"localhost";
"192.168.1.0"/24; /* and everyone on the local network */
! "192.168.1.23"; /* except for the dialin router */
}
sub vcl_recv {
if (req.method == "PURGE") {
if (client.ip ~ local) {
return(purge);
} else {
return(synth(403, "Access denied."));
}
}
}