mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Sending GUID/session based on connection if no cookie exists for socket.io
This commit is contained in:
@@ -88,7 +88,9 @@ function getSession(socket) {
|
|||||||
if(socket.cookie_id == undefined) throw "Undefined error";
|
if(socket.cookie_id == undefined) throw "Undefined error";
|
||||||
return socket.cookie_id;
|
return socket.cookie_id;
|
||||||
} catch(e) {
|
} 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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user