From fa7bd34e4dc3882f37e9afd92a96edc59b6af1cf Mon Sep 17 00:00:00 2001 From: Ziedelth Date: Thu, 4 Jan 2024 10:06:16 +0100 Subject: [PATCH] Change to accept all methods and any host --- src/main/kotlin/fr/shikkanime/plugins/HTTP.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/fr/shikkanime/plugins/HTTP.kt b/src/main/kotlin/fr/shikkanime/plugins/HTTP.kt index 0674a112..b9f2bd49 100644 --- a/src/main/kotlin/fr/shikkanime/plugins/HTTP.kt +++ b/src/main/kotlin/fr/shikkanime/plugins/HTTP.kt @@ -23,11 +23,10 @@ fun Application.configureHTTP() { } } install(CORS) { - allowMethod(HttpMethod.Options) - allowMethod(HttpMethod.Put) - allowMethod(HttpMethod.Delete) - allowMethod(HttpMethod.Patch) + HttpMethod.DefaultMethods.forEach { allowMethod(it) } + allowCredentials = true allowHeader(HttpHeaders.Authorization) + anyHost() } install(StatusPages) { exception { call, cause ->