2017-07-26 43 views
0

当我从Hapi-node服务器设置cookie值的TTL时,cookie正在创建,但ttl值看起来不同。Hapi js cookie TTL在浏览器上显示不同的值

enter image description here

let _isSecure = false; 
let _options = { 
ttl: 24 * 60 * 60 * 1000,   
isSecure: _isSecure,  
isHttpOnly: false, 
    path: '/', 
    encoding: 'none' 
};  
return reply(res).state('SESSION-ID', res.responseHeaders['SESSION-ID'], _options) 

回答

0

您provived生存时间为一天,浏览器显示的日期和时间时,页面将实际到期这是一天。

+0

当cookie在浏览器上设置时,值看起来会超过24小时到期时间...请在问题中查找附加图像 – Rao

相关问题