增加不能登录的敏感区域

This commit is contained in:
GoEdgeLab
2023-06-01 15:56:45 +08:00
parent e2ca97379f
commit c3b616c13e

View File

@@ -235,7 +235,7 @@ func (this *IndexAction) RunPost(params struct {
func (this *IndexAction) checkRegion() bool {
var ip = this.RequestRemoteIP()
var result = iplibrary.LookupIP(ip)
if result != nil && result.IsOk() && result.CountryId() > 0 && lists.ContainsInt64([]int64{10}, result.CountryId()) {
if result != nil && result.IsOk() && result.CountryId() > 0 && lists.ContainsInt64([]int64{9, 10}, result.CountryId()) {
return false
}
return true