在开启on_http_access hook时,访问http文件(或目录)ip白名单机制不生效

on_http_access hook优先级更高,关闭on_http_access hook时才采用ip白名单机制,防止两种鉴权机制间的冲突
This commit is contained in:
xia-chu
2023-07-27 15:39:43 +08:00
parent dfae1aee97
commit c1f6517471
2 changed files with 5 additions and 6 deletions

View File

@@ -382,11 +382,6 @@ static void canAccessPath(Session &sender, const Parser &parser, const MediaInfo
return;
}
if (!HttpFileManager::isIPAllowed(sender.get_peer_ip())) {
callback("Your ip is not allowed to access the service.", nullptr);
return;
}
// 事件未被拦截则认为是http下载请求
bool flag = NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastHttpAccess, parser, path, is_dir, accessPathInvoker, static_cast<SockInfo &>(sender));
if (!flag) {