From 835d6bd9b590ea46e757f6c002fa101149b621eb Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Thu, 9 Jan 2020 17:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=9C=AC=E6=9C=BA=E5=92=8C?= =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=94=A8=E6=88=B7=E4=BB=BB=E6=84=8F=E8=AE=BF?= =?UTF-8?q?=E9=97=AEhttp=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebHook.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/WebHook.cpp b/server/WebHook.cpp index 4eb54eec..e2e7824e 100644 --- a/server/WebHook.cpp +++ b/server/WebHook.cpp @@ -438,7 +438,7 @@ void installWebHook(){ //如果没有url参数,客户端又不支持cookie,那么会根据ip和端口追踪用户 //追踪用户的目的是为了缓存上次鉴权结果,减少鉴权次数,提高性能 NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpAccess,[](BroadcastHttpAccessArgs){ - if(sender.get_peer_ip() == "127.0.0.1" && parser.Params() == hook_adminparams){ + if(sender.get_peer_ip() == "127.0.0.1" || parser.Params() == hook_adminparams){ //如果是本机或超级管理员访问,那么不做访问鉴权;权限有效期1个小时 invoker("","",60 * 60); return;