Browse files

Added session() self-awareness

  • Loading branch information...
1 parent 03604eb commit 89641c79966c5c07bc62e690730b1dc85ce5dd5e @tj tj committed Feb 28, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/middleware/session.js
View
4 lib/middleware/session.js
@@ -115,6 +115,10 @@ function session(options){
}
return function session(req, res, next) {
+ // self-awareness
+ if (req.session) return next();
+
+ // parse url
var url = parse(req.url)
, path = url.pathname;

0 comments on commit 89641c7

Please sign in to comment.