mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
try to get ip from x-forwarded-for first
This commit is contained in:
@@ -40,7 +40,7 @@ Sockets.init = function(server) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function onConnection(socket) {
|
function onConnection(socket) {
|
||||||
socket.ip = socket.request.connection.remoteAddress;
|
socket.ip = socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress;
|
||||||
|
|
||||||
logger.io_one(socket, socket.uid);
|
logger.io_one(socket, socket.uid);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user