From d15c643edce031b73363640b82badaed7a1250e6 Mon Sep 17 00:00:00 2001 From: Maciej Procyk Date: Sat, 16 Mar 2024 21:00:13 +0100 Subject: [PATCH] fix cors --- server/src/main/kotlin/in/procyk/shin/Plugins.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/main/kotlin/in/procyk/shin/Plugins.kt b/server/src/main/kotlin/in/procyk/shin/Plugins.kt index e416932..9430504 100644 --- a/server/src/main/kotlin/in/procyk/shin/Plugins.kt +++ b/server/src/main/kotlin/in/procyk/shin/Plugins.kt @@ -35,5 +35,8 @@ private fun Application.installCors(dotenv: Dotenv) { install(CORS) { allowHost("${corsHost}:${corsPort}", schemes = listOf(corsScheme)) allowMethod(HttpMethod.Post) + allowHeader(HttpHeaders.ContentType) + allowHeader(HttpHeaders.ContentLength) + allowNonSimpleContentTypes = true } } \ No newline at end of file