Initializer
init(cookieName:cookieFactory:)
Create a new
SessionsConfig with the supplied cookie factory.init(cookieName: String, cookieFactory: @Sendable @escaping (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)
}