X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0f5ad1f3cc5d82efef93d2d17809145c5f68f233..640ea955fe1eb5c4719664e13f6b6bcc5c5ae7f6:/lib/osm.rb?ds=sidebyside diff --git a/lib/osm.rb b/lib/osm.rb index 66428c13c..841cce17b 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -510,13 +510,13 @@ module OSM if ipinfo country = ipinfo.country_code2 else - country = http_client.get("http://api.hostip.info/country.php?ip=#{ip_address}").body + country = http_client.get("https://api.hostip.info/country.php?ip=#{ip_address}").body country = "GB" if country == "UK" end - return country + country rescue StandardError - return nil + nil end def self.ip_location(ip_address)