From 6dcd302ab7c49bf3460a48a2634b3ac3811ff45f Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 16 Aug 2023 20:08:01 +0200 Subject: [PATCH] OPTIONS method does not have to be allowed --- .../de/twomartens/wahlrecht/configuration/WebConfiguration.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/WebConfiguration.kt b/module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/WebConfiguration.kt index f796bc3..15b0cbf 100644 --- a/module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/WebConfiguration.kt +++ b/module-server/src/main/kotlin/de/twomartens/wahlrecht/configuration/WebConfiguration.kt @@ -16,8 +16,8 @@ open class WebConfiguration(private val headerInterceptorRest: HeaderInterceptor override fun addCorsMappings(registry: CorsRegistry) { val registration = registry.addMapping("/**") registration.allowedMethods( - HttpMethod.GET.name(), HttpMethod.POST.name(), - HttpMethod.PUT.name(), HttpMethod.OPTIONS.name() + HttpMethod.GET.name(), HttpMethod.POST.name(), + HttpMethod.PUT.name(), HttpMethod.HEAD.name() ) registration.allowCredentials(true) registration.allowedOrigins(