Skip to content

Commit

Permalink
Reverted to x-forwarded-for to support NAT properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Antrikshy committed Sep 4, 2016
1 parent d110e3c commit 7d9f18b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Expand Up @@ -74,7 +74,7 @@ var usertags = {}; // Nicknames by socket.id
numOfUsers = 0;
var messageColors = ["#FFFFFF", "#044B7F"];
io.on('connection', function(socket) {
var userIp = socket.client.request.headers['x-real-ip'];
var userIp = socket.client.request.headers['x-forwarded-for'];

for (var id in usertags) {
if (socket.handshake.query.tag.length > 0 && usertags[id] ===
Expand Down

0 comments on commit 7d9f18b

Please sign in to comment.