spring-framework / org.springframework.web.server.session / CookieWebSessionIdResolver / setCookieMaxAge

setCookieMaxAge

open fun setCookieMaxAge(maxAge: Duration): Unit

Set the value for the "Max-Age" attribute of the cookie that holds the session id. For the range of values see ResponseCookie#getMaxAge().

By default set to -1.

Parameters

maxAge - the maxAge duration value