“Sesi Express SaveUnitialized” Kode Jawaban

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

Sesi Express SaveUnitialized

<!---------------------------------------------------------------------->
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

Jawaban yang mirip dengan “Sesi Express SaveUnitialized”

Pertanyaan yang mirip dengan “Sesi Express SaveUnitialized”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya