也许有些过时,但是在此时,Express-session可以识别cookie的域选项。根据消息来源:
function session(options){ var options = options || {} // name - previously "options.key" , name = options.name || options.key || 'connect.sid' , store = options.store || new MemoryStore , cookie = options.cookie || {} ...
这是用于设置cookie的:
var cookie = module.exports = function cookie(options) { this.path = '/'; this.maxAge = null; this.httponly = true; if (options) merge(this, options); ...
因此,类似的方法适用于当前的1.10.1 master:
secret: "my secret", cookie: { domain: "mydomain.com",
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)