mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-08-06 05:08:28 +02:00
Fixed #131
- Added LAN detection in geoip resolver - Updated UI for LAN/loopback request origin rendering
This commit is contained in:
@@ -83,6 +83,11 @@ func (s *Store) GetRequesterCountryISOCode(r *http.Request) string {
|
||||
if ipAddr == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
if netutils.IsPrivateIP(ipAddr) {
|
||||
return "LAN"
|
||||
}
|
||||
|
||||
countryCode, err := s.ResolveCountryCodeFromIP(ipAddr)
|
||||
if err != nil {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user