commit c00ba6069915cf516a040d09aa2454dbfe0fa587
parent a3e751ee23e8db2a615e1cb2bcaa1071531267ca
Author: RobinLinus <RobinLinus@users.noreply.github.com>
Date: Mon, 18 Feb 2019 23:21:44 +0100
Merge pull request #75 from JBYoshi/localhost
Make IPv4 and IPv6 localhost connections use the same room.
Diffstat:
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) {