From 00a4d756738117530233c27e593b8d7a60200c01 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 20 Apr 2022 08:36:29 +0400 Subject: [PATCH] #3 -- allow cors requests --- .../java/ru/ulstu/configuration/ControllersConfiguration.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/ru/ulstu/configuration/ControllersConfiguration.java b/src/main/java/ru/ulstu/configuration/ControllersConfiguration.java index 7cb3e33..a741aea 100644 --- a/src/main/java/ru/ulstu/configuration/ControllersConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/ControllersConfiguration.java @@ -17,6 +17,9 @@ class ControllersConfiguration { config.addAllowedHeader("*"); config.addAllowedMethod("GET"); config.addAllowedMethod("POST"); + config.addAllowedMethod("PUT"); + config.addAllowedMethod("PATCH"); + config.addAllowedMethod("OPTIONAL"); config.addAllowedMethod("DELETE"); source.registerCorsConfiguration("/**", config); return new CorsFilter(source);