diff --git a/server/src/main/kotlin/com/jaytux/phoebench/server/Main.kt b/server/src/main/kotlin/com/jaytux/phoebench/server/Main.kt index 352f585..44ed0df 100644 --- a/server/src/main/kotlin/com/jaytux/phoebench/server/Main.kt +++ b/server/src/main/kotlin/com/jaytux/phoebench/server/Main.kt @@ -40,14 +40,20 @@ fun Application.module() { val allowLocalhost = environment.config.propertyOrNull("ktor.cors.enableLocalhostOn")?.getString() ?: "0" val safeOrigin = environment.config.propertyOrNull("ktor.cors.browserOrigin")?.getString() install(CORS) { + // -- methods -- allowMethod(HttpMethod.Options) allowMethod(HttpMethod.Delete) allowMethod(HttpMethod.Patch) allowMethod(HttpMethod.Get) allowMethod(HttpMethod.Post) + // -- headers -- allowHeader(HttpHeaders.Accept) + allowHeader(HttpHeaders.Pragma) allowHeader(HttpHeaders.Authorization) allowHeader(HttpHeaders.ContentType) + allowHeader(HttpHeaders.CacheControl) + allowHeader(HttpHeaders.LastEventID) + // -- exposed headers -- exposeHeader(HttpHeaders.ContentType) allowCredentials = true allowNonSimpleContentTypes = true