Initializer
init(cookieName:cookieFactory:)
Create a new
SessionsConfig with the supplied cookie factory.@preconcurrency init(cookieName: String, cookieFactory: @escaping @Sendable (SessionID) -> HTTPCookies.Value)
Parameters
cookieNameName of HTTP cookie, used as a key for the cookie value.
cookieFactoryCreates a new
HTTPCookieValuefor the supplied valueString.
Discussion
let sessionsConfig = SessionsConfig(cookieName: "vapor-session") { value in
return HTTPCookieValue(string: value, isSecure: true)
}