Sending GUID/session based on connection if no cookie exists for socket.io

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-22 18:25:18 +02:00
parent dde755a2a7
commit a426cd4ea5

View File

@@ -88,7 +88,9 @@ function getSession(socket) {
if(socket.cookie_id == undefined) throw "Undefined error";
return socket.cookie_id;
} catch(e) {
return "empty";
// Returning "sessiong"-based on place of connection
return Functions.hash_pass(socket.handshake.headers["user-agent"] + socket.handshake.address + socket.handshake.headers["accept-language"]);
//return "empty";
}
}