void
icpDenyAccess(Ip::Address &from, char *url, int reqnum, int fd)
{
- debugs(12, 2, "icpDenyAccess: Access Denied for " << from << " by " << AclMatchedName << ".");
-
if (clientdbCutoffDenied(from)) {
/*
* count this DENIED query in the clientdb, even though
bool
icpAccessAllowed(Ip::Address &from, HttpRequest * icp_request)
{
- /* absent any explicit rules, we deny all */
- if (!Config.accessList.icp)
+ if (!Config.accessList.icp) {
+ debugs(12, 2, "Access Denied due to lack of ICP access rules.");
return false;
+ }
ACLFilledChecklist checklist(Config.accessList.icp, icp_request, nullptr);
checklist.src_addr = from;
checklist.my_addr.setNoAddr();
- return checklist.fastCheck().allowed();
+ const auto &answer = checklist.fastCheck();
+ if (answer.allowed())
+ return true;
+
+ debugs(12, 2, "Access Denied for " << from << " by " << answer.lastCheckDescription() << ".");
+ return false;
}
HttpRequest *