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