mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
add Session flows (5x)
- fix CORS
This commit is contained in:
parent
a2b2608312
commit
369d5491e8
@ -46,15 +46,6 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
|||||||
isLenient = true
|
isLenient = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
install(CORS) {
|
|
||||||
allowMethod(HttpMethod.Options)
|
|
||||||
allowMethod(HttpMethod.Put)
|
|
||||||
allowMethod(HttpMethod.Patch)
|
|
||||||
allowMethod(HttpMethod.Delete)
|
|
||||||
allowMethod(HttpMethod.Get)
|
|
||||||
allowHost(dotenv["FRONTEND"] ?: "localhost:3000", schemes = listOf("http", "https", "ws", "wss"))
|
|
||||||
allowCredentials = true
|
|
||||||
}
|
|
||||||
install(Sessions) {
|
install(Sessions) {
|
||||||
cookie<UserSession>("user_session", storage = SessionStorageMemory()) {}
|
cookie<UserSession>("user_session", storage = SessionStorageMemory()) {}
|
||||||
}
|
}
|
||||||
@ -126,6 +117,16 @@ val server = embeddedServer(Netty, port = 8080, ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install(CORS) {
|
||||||
|
allowMethod(HttpMethod.Options)
|
||||||
|
allowMethod(HttpMethod.Put)
|
||||||
|
allowMethod(HttpMethod.Patch)
|
||||||
|
allowMethod(HttpMethod.Delete)
|
||||||
|
allowMethod(HttpMethod.Get)
|
||||||
|
allowHost(dotenv["FRONTEND"] ?: "localhost:3000", schemes=listOf("https"))
|
||||||
|
allowCredentials = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun start() {
|
fun start() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user