From 2c696596b0f58a3cb709806a4fedd018be91c8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vandendaelen?= Date: Mon, 20 May 2024 14:20:55 +0200 Subject: [PATCH] Added allowed headers --- src/main/kotlin/be/vandeas/plugins/HTTP.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/be/vandeas/plugins/HTTP.kt b/src/main/kotlin/be/vandeas/plugins/HTTP.kt index 080889b..5104531 100644 --- a/src/main/kotlin/be/vandeas/plugins/HTTP.kt +++ b/src/main/kotlin/be/vandeas/plugins/HTTP.kt @@ -13,6 +13,9 @@ fun Application.configureHTTP() { allowMethod(HttpMethod.Put) allowMethod(HttpMethod.Get) allowHeader(HttpHeaders.Authorization) - anyHost() // @TODO: Don't do this in production if possible. Try to limit it. + allowHeader(HttpHeaders.ContentType) + allowHeader(HttpHeaders.Accept) + allowHeader(HttpHeaders.AccessControlAllowOrigin) + anyHost() } }