mirror of
https://github.com/gotson/komga.git
synced 2026-04-25 00:13:51 +02:00
feat(komga): replace configuration komga.session-timeout with the standard server.servlet.session.timeout
This commit is contained in:
parent
48e9d325c4
commit
0364621728
3 changed files with 4 additions and 4 deletions
|
|
@ -46,6 +46,7 @@ class KomgaProperties {
|
|||
@Deprecated("Moved to server settings since 1.5.0")
|
||||
var rememberMe = RememberMe()
|
||||
|
||||
@Deprecated("Removed since 1.5.0", ReplaceWith("server.servlet.session.timeout"))
|
||||
@DurationUnit(ChronoUnit.SECONDS)
|
||||
var sessionTimeout: Duration = Duration.ofMinutes(30)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package org.gotson.komga.infrastructure.security.session
|
|||
|
||||
import com.github.gotson.spring.session.caffeine.CaffeineIndexedSessionRepository
|
||||
import com.github.gotson.spring.session.caffeine.config.annotation.web.http.EnableCaffeineHttpSession
|
||||
import org.gotson.komga.infrastructure.configuration.KomgaProperties
|
||||
import org.springframework.boot.autoconfigure.web.ServerProperties
|
||||
import org.springframework.context.annotation.Bean
|
||||
import org.springframework.context.annotation.Configuration
|
||||
import org.springframework.security.core.session.SessionRegistry
|
||||
|
|
@ -34,9 +34,9 @@ class SessionConfiguration {
|
|||
SmartHttpSessionIdResolver(sessionHeaderName, cookieSerializer)
|
||||
|
||||
@Bean
|
||||
fun customizeSessionRepository(komgaProperties: KomgaProperties) =
|
||||
fun customizeSessionRepository(serverProperties: ServerProperties) =
|
||||
SessionRepositoryCustomizer<CaffeineIndexedSessionRepository> {
|
||||
it.setDefaultMaxInactiveInterval(komgaProperties.sessionTimeout.seconds.toInt())
|
||||
it.setDefaultMaxInactiveInterval(serverProperties.servlet.session.timeout.seconds.toInt())
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ komga:
|
|||
file: \${komga.config-dir}/database.sqlite
|
||||
lucene:
|
||||
data-directory: \${komga.config-dir}/lucene
|
||||
session-timeout: 7d
|
||||
config-dir: \${user.home}/.komga
|
||||
|
||||
spring:
|
||||
|
|
|
|||
Loading…
Reference in a new issue