node.js - Different sessionID after server restart express -


this question has answer here:

i've noticed noticed when restart express server, session id saved on browser updated new value. normal behavior? can configure?

these current express-session options:

var sessionoptions = {   secret: "secret_here",   resave: false,   saveuninitialized: true,   cookie: {     maxage: 86400000   } } 

as stated in docs:

each session has unique id associated it.

you can override function generates id setting genid property.

app.use(session({   genid: function(req) {     return genuuid() // use uuids session ids   },   secret: 'keyboard cat' })) 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -