Skip to content

Instantly share code, notes, and snippets.

@telen
Created September 20, 2012 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telen/3756363 to your computer and use it in GitHub Desktop.
Save telen/3756363 to your computer and use it in GitHub Desktop.
Node.js(v0.9.1-pre) & express(3.0.0rc4) enable signed cookie and session
Node.js & express enable signed cookie and session
app.use(express.cookieParser(‘telen’));
app.use(express.session());
response.cookie('name', 'value', {maxAge: 60000, signed: true});
request.signedCookies.name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment