Geolocation update for peer sync

-freegeoip.app now requires an api key so the peer sync has been updated to use reallyfreegeoip.org instead
-Added extra error checking to the peer sync so that it will error out when the geolocation service does not return a proper object
This commit is contained in:
Joe Uhren
2022-04-30 21:27:12 -06:00
parent d7c18a48f5
commit 44caca42b1
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -975,7 +975,7 @@ module.exports = {
},
get_geo_location: function(address, cb) {
request({uri: 'https://freegeoip.app/json/' + address, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, geo) {
request({uri: 'https://reallyfreegeoip.org/json/' + address, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, geo) {
return cb(error, geo);
});
},