add Session flows (2x)

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

View File

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