add Session flows (3x)

- fix CORS
This commit is contained in:
dalbodeule 2024-08-08 17:08:01 +09:00
parent 9879fafa25
commit cd2b4e0fc0
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -53,6 +53,7 @@ val server = embeddedServer(Netty, port = 8080, ) {
allowMethod(HttpMethod.Delete) allowMethod(HttpMethod.Delete)
allowMethod(HttpMethod.Get) allowMethod(HttpMethod.Get)
allowHost(dotenv["FRONTEND"] ?: "localhost:3000") allowHost(dotenv["FRONTEND"] ?: "localhost:3000")
allowCredentials = true
} }
install(Sessions) { install(Sessions) {
cookie<UserSession>("user_session", storage = SessionStorageMemory()) {} cookie<UserSession>("user_session", storage = SessionStorageMemory()) {}