有没有办法设置 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)