Create geo-block.lua

pull/60/head
有安科技 2024-03-28 10:02:03 +08:00
parent 9b569692fd
commit 203ad34cdd
1 changed files with 16 additions and 0 deletions

16
rules/geo-block.lua Normal file
View File

@ -0,0 +1,16 @@
--[[
: 访
:
:
: 访
--]]
local country, province, city = waf.ip2loc(waf.ip)
if country and country ~= "中国" then
return true, "限制非中国地区访问", true
end
return false