“Session express SaveUninitialized” Réponses codées

NPM Express-session

npm i express-session	//On Hyper/CMD

const session = require('express-session');	//To Acquire it

app.use(session({ 		//Usuage
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: true }
}));
KD

Session express SaveUninitialized

<!---------------------------------------------------------------------->
What is express-session saveUninitialized?
  
Forces a session that is “uninitialized” to be saved to the store. 
A session is uninitialized when it is new but not modified.  

"One thing to note is that if you set saveUninitialized to false,
the session cookie will not be set on the browser unless the session
is modified." 
<!---------------------------------------------------------------------->
KostasX

Réponses similaires à “Session express SaveUninitialized”

Questions similaires à “Session express SaveUninitialized”

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code