Question

I'm getting an error when I try to use restify with connect session middleware. The session middleware expects req.originalUrl but restify doesnt set that property. (It only sets req.url) That is causing an exception in the session code. Is there any workaround for this?

Thanks, Sharath

Was it helpful?

Solution

can you just set it yourself?

app.use(function(req, res, next){
  req.originalUrl = req.url;
  next();
});
app.use(connect.session({secret:'foo'});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top