Commit 65d0f22b by CnChunfeng

暂时处理

parent abd1f236
Showing with 27 additions and 0 deletions
......@@ -136,6 +136,33 @@ if pageNum ~= nil and tonumber(pageNum) >= 50 then
red:sadd('ichunt_waf_black_ip',user_ip)
end
-------s------------------------20230630新增对m.ichunt.com特殊处理-------s------------------------
--如果在检测的路由中则继续
if temp_uri == '/v3/api/common/data' and tonumber(ngx.var.server_name_id) == 2 then
--获取对应的时间和次数
checkuricount = 5
checkuritime = 4
checkuriip = 'waf_urldesc_limit_'..user_ip
--如果不存在则设为1
if red:get(checkuriip) == ngx.null then
red:set(checkuriip,0)
end
--自增1 设置超时时间
red:incr(checkuriip)
red:expire(checkuriip , checkuritime)
--如果超过次数就跳转至google验证页面,并且带上网址
if tonumber(red:get(checkuriip)) > checkuricount then
redirect.checkgoogle(red)
end
end
-------e------------------------20230630新增对m.ichunt.com特殊处理-------e------------------------
......
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