Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxAge don't set from config #64

Closed
enhaster opened this issue Sep 2, 2016 · 3 comments
Closed

maxAge don't set from config #64

enhaster opened this issue Sep 2, 2016 · 3 comments
Assignees
Labels

Comments

@enhaster
Copy link

enhaster commented Sep 2, 2016

Hello, sorry for my bad eng. I have a trouble with maxAge property, that work only from direct input, but not from config.

Example:

app.use(cookieSession({
  name: 'sessiondata',
  keys: ['key1', 'key2'],
  cookie: { 
            maxAge: 1 // set the default value
          }
    })
);
app.get('/login', function(req, res, next) {
  res.cookie('id', 'lol');  //default maxage=1 dont work
  res.cookie('id2', '2222222', { maxAge: 1222});//its work
  res.send(req.cookies.id+req.cookies.id2); //id = lol    id2=undifened (if wait a few seconds and update page)
});
@dougwilson
Copy link
Contributor

This module has no relation to the res.cookie command, so the settings from this module have no effect on res.cookie.

@enhaster
Copy link
Author

enhaster commented Sep 2, 2016

Oh, my bad. Thank you for explanation.

@enhaster enhaster closed this as completed Sep 2, 2016
@dougwilson dougwilson self-assigned this Sep 2, 2016
@dougwilson
Copy link
Contributor

No problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants