Express change session every request

后端 未结 5 1847
夕颜
夕颜 2021-02-11 01:52

I have a function to login

app.post(\'/doLogin\', function(req,res){
        db.users.findOne({username: req.body.username}, function(err, user) {
            if         


        
5条回答
  •  不思量自难忘°
    2021-02-11 02:13

    If {secure:true} is set, and you access your site over HTTP, the cookie will not be set. So, each request will create a new session.

提交回复
热议问题