From 5d0ccb5f8f7b029ed71b0cd5bc668a3fe088a96f Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 4 Nov 2014 18:17:39 +0000 Subject: [PATCH] auth fix --- src/node/hooks/express/socketio.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node/hooks/express/socketio.js b/src/node/hooks/express/socketio.js index 17ce3864a..32c5fd889 100644 --- a/src/node/hooks/express/socketio.js +++ b/src/node/hooks/express/socketio.js @@ -16,8 +16,9 @@ exports.expressCreateServer = function (hook_name, args, cb) { /* Require an express session cookie to be present, and load the * session. See http://www.danielbaulig.de/socket-ioexpress for more * info */ - /* - io.set('authorization', function (data, accept) { + + io.use(function(socket, accept) { + var data = socket.request; if (!data.headers.cookie) return accept('No session cookie transmitted.', false); // Use connect's cookie parser, because it knows how to parse signed cookies @@ -36,7 +37,6 @@ exports.expressCreateServer = function (hook_name, args, cb) { }); }); }); - */ // there shouldn't be a browser that isn't compatible to all // transports in this list at once