diff --git a/lib/middleware.js b/lib/middleware.js index ae6a95e..a9ed943 100755 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -79,7 +79,7 @@ exports.getMiddleware = function(options, cb) { var restRouter = RESTful(options, files.restFiles || []); var middleware = [ - Connect.cookieParser(options.connect.cookieParser.secret), + Connect.cookieParser(options.connect.session.secret), Connect.session(options.connect.session), // bodyParser handling diff --git a/lib/socket.js b/lib/socket.js index af9f75e..af848e5 100755 --- a/lib/socket.js +++ b/lib/socket.js @@ -169,7 +169,7 @@ var init = socket.init = function(options, cb, mirror) { } var cookies = cookie.parse(handshakeData.headers.cookie); - cookies = Connect.utils.parseSignedCookies(cookies, options.connect.cookieParser.secret), + cookies = Connect.utils.parseSignedCookies(cookies, options.connect.session.secret), sessionIdCookie = cookies[options.connect.session.key]; console.log("Socket handshake session id is " + sessionIdCookie); handshakeData.sessionId = sessionIdCookie;