snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit cd221881b66d8d12fd48633533f807851a1d3e5d
parent 6de5e297d8c15204a18a63ea951feb383c466538
Author: JBYoshi <12983479+JBYoshi@users.noreply.github.com>
Date:   Mon, 18 Feb 2019 15:52:05 -0600

Make IPv4 and IPv6 localhost connections use the same room

Diffstat:
Mserver/index.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git 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) {