📜  使用会话在服务器上创建 cookie - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:23.900000             🧑  作者: Mango

代码示例1
var app = express()
app.set('trust proxy', 1) // trust first proxy
app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  cookie: { secure: true }
}))