I hereby claim:
- I am alanjames1987 on github.
- I am alanjames1987 (https://keybase.io/alanjames1987) on keybase.
- I have a public key ASAfHZl0MgnmPK2vfmBInxNOcV7JSgmD7GzN6kSZmbc-qgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// modify the req cookies to include session ids sent as part of the body | |
// this is so Express Session reads from the cookies correctly | |
app.use(function(req, res, next) { | |
var sessionId = req.param('sessionId'); | |
// if there was a session id passed add it to the cookies | |
if (sessionId) { | |
var header = req.headers.cookie; |
var cookie = require('cookie'); | |
var cookieParser = require('cookie-parser'); | |
var _sessionStore; | |
var _sessionSecret; | |
function plugin(data) { | |
// store the Express session cookie name, session store, and session secret for use later | |
_sessionCookie = data.name || 'connect.sid'; |