Kotlin Ktor CORS 설정
03 Jan 2020 | Kotlin ktorCORS 설정
fun Application.module() { install(CORS) { method(HttpMethod.Options) method(HttpMethod.Get) method(HttpMethod.Post) method(HttpMethod.Put) method(HttpMethod.Delete) method(HttpMethod.Patch) header(HttpHeaders.Authorization) allowCredentials = true anyHost() } // ... }