req.session in express-session not persisting

后端 未结 1 1827
臣服心动
臣服心动 2021-02-07 07:56

I have the following code:

var express = require(\'express\');
var cookieParser = require(\'cookie-parser\');
var http = require(\'http\')
var app = express();
a         


        
相关标签:
1条回答
  • 2021-02-07 08:41

    Change cookie: { secure: true }to cookie: { secure: false }

    using secure flag means that the cookie will be set on Https only.

    0 讨论(0)
提交回复
热议问题