OPTIONS method does not have to be allowed

This commit is contained in:
2023-08-16 20:08:01 +02:00
parent e50e769e22
commit 6dcd302ab7
@@ -16,8 +16,8 @@ open class WebConfiguration(private val headerInterceptorRest: HeaderInterceptor
override fun addCorsMappings(registry: CorsRegistry) { override fun addCorsMappings(registry: CorsRegistry) {
val registration = registry.addMapping("/**") val registration = registry.addMapping("/**")
registration.allowedMethods( registration.allowedMethods(
HttpMethod.GET.name(), HttpMethod.POST.name(), HttpMethod.GET.name(), HttpMethod.POST.name(),
HttpMethod.PUT.name(), HttpMethod.OPTIONS.name() HttpMethod.PUT.name(), HttpMethod.HEAD.name()
) )
registration.allowCredentials(true) registration.allowCredentials(true)
registration.allowedOrigins( registration.allowedOrigins(