--- --- Generated by EmmyLua(https://github.com/EmmyLua) --- Created by law. --- DateTime: 2023/10/10 9:36 --- local idc={} -- IDC 拦截 function idc.idc() -- 读取站点配置文件 if Site_config[ngx.ctx.server_name] and Site_config[ngx.ctx.server_name]["idc"] then -- 获取IP local ip=ngx.ctx.ip if not ip then return false end -- 如果IP TAG为 IDC 则直接拦截 if IpInfo.is_idc(ip) then ngx.ctx.is_type="IDC拦截" ngx.var.waf2monitor_blocked="IDC拦截" IpInfo.lan_ip('cc','IDC拦截') return true end end end return idc