Skip to content

Commit

Permalink
cookieSession
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 13, 2012
1 parent 4187547 commit 8d0e97f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions 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.