Skip to content

Commit

Permalink
Update geo-block.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Safe3 committed Sep 5, 2024
1 parent 574f266 commit 5e47ad9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rules/geo-block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
--]]


if waf.contains(waf.ip,":") then
return false
end

local country, province, city = waf.ip2loc(waf.ip)
if country and country ~= "中国" then
return true, "限制非中国地区访问", true
Expand Down

0 comments on commit 5e47ad9

Please sign in to comment.