Skip to content

Commit

Permalink
fix 2056
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Dec 16, 2024
1 parent a7328c9 commit e1f25dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions otoroshi/app/auth/session.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ class PrivateAppsSessionManager(env: Env) {

def printStatus(): Unit = {
if (enabled) {
env.logger.info("Private apps. session is enabled !")
} else {
env.logger.info("Private apps. session is disabled")
logger.info(s"Private apps. session is enabled !")
if (logger.isDebugEnabled) {
logger.debug(s"session config: ${sessionConfig}")
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion otoroshi/app/env/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,6 @@ class Env(
configuration.getOptionalWithFileSupport[Int]("otoroshi.next.experimental.http2-client-proxy.port").getOrElse(8555)

lazy val privateAppsSessionManager: PrivateAppsSessionManager = new PrivateAppsSessionManager(this)
privateAppsSessionManager.printStatus()

lazy val defaultConfig = GlobalConfig(
initWithNewEngine = true,
Expand Down Expand Up @@ -1341,6 +1340,8 @@ class Env(

DynamicSSLEngineProvider.setCurrentEnv(this)

privateAppsSessionManager.printStatus()

clusterAgent.warnAboutHttpLeaderUrls()
if (clusterConfig.mode == ClusterMode.Leader) {
logger.info(s"Running Otoroshi Leader agent !")
Expand Down
3 changes: 2 additions & 1 deletion otoroshi/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ app {
maxAge = ${?OTOROSHI_PRIVATEAPPS_SESSION_MAX_AGE} # the cookie for otoroshi privateapps max age
domain = ${app.privateapps.subdomain}"."${otoroshi.domain} # the cookie for otoroshi privateapps domain
domain = ${?OTOROSHI_PRIVATEAPPS_SESSION_DOMAIN} # the cookie for otoroshi privateapps domain
cookieName = "otoroshi-sso-session" # the cookie for otoroshi privateapps name
#cookieName = "otoroshi-sso-session" # the cookie for otoroshi privateapps name
cookieName = ${play.http.session.cookieName}"-sso" # the cookie for otoroshi privateapps name
cookieName = ${?OTOROSHI_PRIVATEAPPS_SESSION_NAME} # the cookie for otoroshi privateapps name
sameSite = "lax"
sameSite = ${?OTOROSHI_PRIVATEAPPS_SESSION_SAMESITE}
Expand Down

0 comments on commit e1f25dd

Please sign in to comment.