table.lookup_acl

ACLtable.lookup_aclIDidSTRINGkeyACLdefault

Available inall subroutines.

Looks up the key key in the table id. When the key is present, its associated value will be returned. When the key is absent, the default value is returned. The default value is required.

Example

acl documents {
"192.0.2.0"/24;
"203.0.113.0"/24;
}
acl images {
"198.51.100.0"/24;
"2001:db8::"/32;
}
# fallback to disallow any file extension not explicitly listed
acl empty {
}
table ext ACL {
"doc": documents,
"docx": documents,
"pdf": documents,
"png": images,
"jpg": images,
"jpeg": images,
}
sub vcl_recv {
if (client.ip !~ table.lookup_acl(ext, req.url.ext, empty)) {
error 403;
}
}