add Session flows

- fix CORS
This commit is contained in:
dalbodeule 2024-08-08 16:22:06 +09:00
parent b864fc262b
commit c179195b18
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

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