diff --git a/lib/node.js b/lib/node.js index 8e4f9ca7..454fa544 100644 --- a/lib/node.js +++ b/lib/node.js @@ -102,6 +102,9 @@ Node.prototype.setInfo = function(data, callback) Node.prototype.setGeo = function(ip) { + if (ip.substr(0, 7) == "::ffff:") { + ip = ip.substr(7) + } this.info.ip = ip; this.geo = geoip.lookup(ip); } diff --git a/package.json b/package.json index 1d202cc7..4eafcb21 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "d3": "3.5.6", "debug": "2.2.0", "express": "4.13.3", - "geoip-lite": "1.1.6", + "geoip-lite": "1.2.1", "grunt": "^0.4.5", "grunt-contrib-clean": "^0.6.0", "grunt-contrib-concat": "^0.5.1",