mirror of
https://github.com/wikiZ/RedGuard
synced 2026-06-08 18:18:32 +00:00
Optimized the problem of requesting regional restriction matching errors
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
## [24.06.18.2001] - 2024-06-18
|
||||
### Update
|
||||
- Optimized the problem of requesting regional restriction matching errors
|
||||
|
||||
## [23.08.21.0113] - 2023-08-21
|
||||
### Added
|
||||
- Custom Delete Response Fields
|
||||
|
||||
@@ -83,8 +83,10 @@ func IPLookUp(location, ip string) (state bool) {
|
||||
_ = json.Indent(&prettyJSON, []byte(IPLook.body), "", "\t")
|
||||
logger.Emergency(string(prettyJSON.Bytes()))
|
||||
// Check whether the IP address is the same as the specified location
|
||||
if strings.Contains(strings.ToLower(IPLook.location), strings.ToLower(location)) {
|
||||
return true // The query result is true
|
||||
for _, location := range strings.Split(location, ",") {
|
||||
if strings.Contains(strings.ToLower(IPLook.location), strings.ToLower(location)) {
|
||||
return true // The query result is true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user