Commit 43c17fb6 by Joneq

修改代码

parent 6a567dda
Showing with 3 additions and 3 deletions
...@@ -86,7 +86,7 @@ u_agent = ngx.req.get_headers().user_agent ...@@ -86,7 +86,7 @@ u_agent = ngx.req.get_headers().user_agent
ngx.say(user_ip) ngx.say(user_ip)
local is_exist = wafcheck.BlackIp(user_ip) local is_exist = wafcheck.BlackIp(user_ip,red)
ngx.say(is_exist) ngx.say(is_exist)
ngx.exit(ngx.HTTP_FORBIDDEN) ngx.exit(ngx.HTTP_FORBIDDEN)
......
...@@ -38,8 +38,8 @@ end ...@@ -38,8 +38,8 @@ end
-------黑名单Ip -------黑名单Ip
function _Wafcheck.BlackIp(user_ip) function _Wafcheck.BlackIp(user_ip,reds)
local is_exist ,err = red:sismember('ichunt_waf_black_ip', user_ip) local is_exist ,err = reds:sismember('ichunt_waf_black_ip', user_ip)
ngx.say(is_exist) ngx.say(is_exist)
ngx.say(err) ngx.say(err)
if is_exist == 1 then if is_exist == 1 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment