|
|
@ -76,6 +76,7 @@ Sockets.init = async function (server) {
|
|
|
|
|
|
|
|
|
|
|
|
function onConnection(socket) {
|
|
|
|
function onConnection(socket) {
|
|
|
|
socket.uid = socket.request.uid;
|
|
|
|
socket.uid = socket.request.uid;
|
|
|
|
|
|
|
|
socket.data.uid = socket.uid; // socket.data is shared between nodes via fetchSockets
|
|
|
|
socket.ip = (
|
|
|
|
socket.ip = (
|
|
|
|
socket.request.headers['x-forwarded-for'] ||
|
|
|
|
socket.request.headers['x-forwarded-for'] ||
|
|
|
|
socket.request.connection.remoteAddress || ''
|
|
|
|
socket.request.connection.remoteAddress || ''
|
|
|
|