Skip to content

Commit

Permalink
add country code in query
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jun 23, 2024
1 parent 4a77077 commit e1bdd5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/pex/addrbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ type ipInfo struct {
}

func getRegionFromIP(ip string) (string, error) {
req, err := http.Get(fmt.Sprintf("http://ip-api.com/json/%s?fields=status,country", ip))
req, err := http.Get(fmt.Sprintf("http://ip-api.com/json/%s?fields=status,country,countryCode", ip))
if err != nil {
return "", err
}
Expand Down

0 comments on commit e1bdd5b

Please sign in to comment.