Permalink
Browse files

replace expires with maxAge

  • Loading branch information...
1 parent 1d50b21 commit 21c83c6a2d9e9cad844d442dbcc14dee20926a81 @tblobaum committed Jul 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.js
View
@@ -4,7 +4,7 @@ var fs = require('fs')
, url = require('url')
, pixel = fs.readFileSync(__dirname + '/pixel.gif')
, fns = []
- , conf = { disable_cookies : false, expires : 900000 }
+ , conf = { disable_cookies : false, maxAge: 2592000000 }
function use (fn) {
if (typeof fn === 'function') {
@@ -26,7 +26,7 @@ function middleware (req, res, next) {
_getUserToken(function (e, token) {
req.cookies._tracker = token
res.cookie('_tracker', req.cookies._tracker, {
- expires : new Date(Date.now() + conf.expires)
+ maxAge : conf.maxAge
, httpOnly : true
})
res.end(pixel, 'binary')

0 comments on commit 21c83c6

Please sign in to comment.