![trac:在 Web 浏览器关闭后保留 trac_auth cookie](https://linux22.com/image/552477/trac%EF%BC%9A%E5%9C%A8%20Web%20%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%B3%E9%97%AD%E5%90%8E%E4%BF%9D%E7%95%99%20trac_auth%20cookie.png)
有没有办法设置 trac_auth cookie 的有效期,以便我即使在关闭 Web 浏览器后仍能保持登录状态?据我现在所见,它被设置为在浏览器退出时被删除。我使用 Trac 的标准安装。
答案1
在trac.ini
->[trac]
部分:
auth_cookie_lifetime Lifetime of the authentication cookie, in seconds.
This value determines how long the browser will cache authentication information,
and therefore, after how much inactivity a user will have to log in again.
The default value of 0 makes the cookie expire at the end of the browsing session.
(since 0.12)