diff --git a/server/index.js b/server/index.js index 4c02151..36a0f62 100644 --- a/server/index.js +++ b/server/index.js @@ -158,6 +158,10 @@ class Peer { } else { this.ip = request.connection.remoteAddress; } + // IPv4 and IPv6 use different values to refer to localhost + if (this.ip == '::1' || this.ip == '::ffff:127.0.0.1') { + this.ip = '127.0.0.1'; + } } _setPeerId(request) {