Claude Brisson
03/15/2021, 8:18 AMinstall(Sessions) {
cookie<Session>("JSESSIONID", directorySessionStorage(File(".sessions"), cached = true)) {
cookie.extensions["SameSite"] = "lax"
cookie.path = "/"
}
}
Let say the Session class is a general purpose empty class that I just want always created, independent of any authentication mechanism. What else do I need in my application routing for the Set-Cookies header to be generated in each response ?Claude Brisson
03/15/2021, 9:02 AMClaude Brisson
03/15/2021, 9:02 AMcall.sessions.getOrSet("JSESSIONID") { Session() }
whenever I want the session to be retrived or created.Claude Brisson
03/15/2021, 9:06 AMjava.lang.IllegalStateException: Using blocking primitives on this dispatcher is not allowed. Consider using async channel instead or use blocking primitives in withContext(<http://Dispatchers.IO|Dispatchers.IO>) instead.
Claude Brisson
03/15/2021, 9:58 AMClaude Brisson
03/15/2021, 1:12 PM