Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added session() self-awareness

  • Loading branch information...
commit 89641c79966c5c07bc62e690730b1dc85ce5dd5e 1 parent 03604eb
TJ Holowaychuk tj authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/middleware/session.js
4 lib/middleware/session.js
View
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.