From 5e08a593262e74a8bc431ef6b4217fa2e1845586 Mon Sep 17 00:00:00 2001 From: Katerina881 Date: Mon, 13 Feb 2023 15:51:57 +0400 Subject: [PATCH] Add config --- src/main/java/ip/labwork/WebConfiguration.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/ip/labwork/WebConfiguration.java diff --git a/src/main/java/ip/labwork/WebConfiguration.java b/src/main/java/ip/labwork/WebConfiguration.java new file mode 100644 index 0000000..1391886 --- /dev/null +++ b/src/main/java/ip/labwork/WebConfiguration.java @@ -0,0 +1,13 @@ +package ip.labwork; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +class WebConfiguration implements WebMvcConfigurer { + @Override + public void addCorsMappings(CorsRegistry registry){ + registry.addMapping("/**").allowedMethods("*"); + } +}