Skip to content

Commit

Permalink
Merge pull request #230 from constantine2nd/develop
Browse files Browse the repository at this point in the history
Add props session_inactivity_timeout_in_minutes
  • Loading branch information
simonredfern authored Nov 9, 2023
2 parents 48c5f1b + 0291d42 commit 1aba406
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/resources/props/sample.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,10 @@ dev.port=8082
# ------------------------------ Identity Provider OAuth2 Props end --------------------------


# If you want to make the Lift inactivity timeout shorter than
# the container inactivity timeout, set the inactivity timeout here
session_inactivity_timeout_in_minutes = 30


# Please note that depricated name ot this props is: language_tag
default_locale = en_GB
7 changes: 7 additions & 0 deletions src/main/scala/bootstrap/liftweb/Boot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,12 @@ class Boot extends MdcLoggable{
// Used in order to allow to override the Host header where using java's HttpUrlConnection class
System.setProperty("sun.net.http.allowRestrictedHeaders", "true")

Props.get("session_inactivity_timeout_in_minutes") match {
case Full(x) if tryo(x.toLong).isDefined =>
LiftRules.sessionInactivityTimeout.default.set(Full((x.toLong.minutes): Long))
case _ =>
// Do not change default value
}

}
}

0 comments on commit 1aba406

Please sign in to comment.