Permalink
Browse files

cookieSession

  • Loading branch information...
1 parent 4187547 commit 8d0e97f578a0ee340e31db480a8241d6e60dfcce @tj tj committed Oct 13, 2012
Showing with 17 additions and 0 deletions.
  1. +17 −0 en/api/mw-cookieSession.jade
@@ -0,0 +1,17 @@
+section
+ h3(id='cookieSession') cookieSession()
+
+ p.
+ Provides cookie-based sessions, and populates <code>req.session</code>.
+ This middleware takes the following options:
+
+ <ul>
+ <li><code>key</code> cookie name defaulting to <code>connect.sess</code></li>
+ <li><code>secret</code> prevents cookie tampering</li>
+ <li><code>cookie</code> session cookie settings, defaulting to <code>{ path: '/', httpOnly: true, maxAge: null }</code></li>
+ <li><code>proxy</code> trust the reverse proxy when setting secure cookies (via "x-forwarded-proto")</li>
+ </ul>
+
+
+ +js.
+ app.use(express.cookieSession());

0 comments on commit 8d0e97f

Please sign in to comment.