From 9879fafa25d03d6e010c07ad3ca57bf2545b79f7 Mon Sep 17 00:00:00 2001 From: dalbodeule <11470513+dalbodeule@users.noreply.github.com> Date: Thu, 8 Aug 2024 17:06:20 +0900 Subject: [PATCH] add Session flows (2x) - fix CORS --- .../src/main/kotlin/space/mori/chzzk_bot/webserver/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/Main.kt b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/Main.kt index 3a8da24..2f440ae 100644 --- a/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/Main.kt +++ b/webserver/src/main/kotlin/space/mori/chzzk_bot/webserver/Main.kt @@ -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("user_session", storage = SessionStorageMemory()) {}