Skip to content

Commit 04dc987

Browse files
committed
fix bug
1 parent 8f0c20a commit 04dc987

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

guard.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ function Guard:blackListModules(ip, reqUri, headers)
9090
self:debug("[limitUaModules] ip "..ip.." not have ua", ip, reqUri)
9191
self:takeAction(ip,reqUri) --存在则执行相应动作
9292
end
93-
93+
94+
local uaMd5 = ngx.md5(userAgent)
9495
local blackUaKey = uaMd5 .. 'BlackUAKey'
9596
if _Conf.dict:get(blackUaKey) then --判断ua是否存在黑名单字典
9697
self:debug("[blackListModules] ip "..ip.." in ua blacklist".." "..userAgent, ip, reqUri)

0 commit comments

Comments
 (0)