使用res.sendFile() 时,不会在响应中收到set-cookie标头。
app.get(sessionTracker, (req, res, next) => {
res.cookie('tracker', '123a', {
maxAge: 172800000,
httpOnly: true,
secure: true
});
return res.status(200).sendFile(path.join(ROOT_DIR, 'dist', 'index.html')).end();
});
回复

慕勒3428872
					眼眸繁星
					侃侃无极
随时随地看视频慕课网APP
相关分类