From 4c02a25e367eef0d88a5897151e1cb82cb5a505e Mon Sep 17 00:00:00 2001 From: Malik Zharykov Date: Fri, 23 Aug 2024 07:11:21 +0500 Subject: [PATCH] feat(cors): disable cors --- .../kz/ncanode/configuration/CorsConfiguration.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/main/java/kz/ncanode/configuration/CorsConfiguration.java diff --git a/src/main/java/kz/ncanode/configuration/CorsConfiguration.java b/src/main/java/kz/ncanode/configuration/CorsConfiguration.java new file mode 100644 index 00000000..62d230bc --- /dev/null +++ b/src/main/java/kz/ncanode/configuration/CorsConfiguration.java @@ -0,0 +1,13 @@ +package kz.ncanode.configuration; + +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class CorsConfiguration implements WebMvcConfigurer { + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**").allowedMethods("*"); + } +}