2

application.session.maxAge在 Play Framework 1.x 中,可以通过在 application.conf 中设置来指定默认的 cookie 最长期限。2.x 的文档没有提到如何覆盖它,这可能吗?

4

1 回答 1

2

I figured it out.

This pull request tipped me off.

So on line 516 in Http.scala session max age is overriden by the configuration variable session.maxAge if it exists:

    override val maxAge = Play.maybeApplication.flatMap(_.configuration.getInt("session.maxAge")).getOrElse(-1)
于 2013-04-17T10:50:36.037 回答