-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
Using spring-session to implement persistent database sessions, one can no longer use the session configuration in the spring-boot documentation, like server.session.cookie.secure
or server.session.cookie.http-only
.
Spring-boot configures javax.servlet.SessionCookieConfig
through org.springframework.boot.autoconfigure.web.ServerProperties.SessionConfiguringInitializer
and relies on the servlet container to use this configuration for cookies. For some reason, spring-session is configured its own way and doesn't even consider reading any SessionCookieConfig
.
Spring-boot should either provide a org.springframework.session.web.http.CookieSerializer
that propagates configuration from SessionCookieConfiguration
, or the problem should be fixed in spring-session.
Maybe we could get a maven artifact spring-boot-starter-session
that configures this? Spring session seems to be configured differently from any other spring framework with Spring Boot (documentation)