diff --git a/pom.xml b/pom.xml
index fbcf97e..41d7d49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
- 17
+ 21
@@ -53,6 +53,7 @@
org.projectlombok
lombok
true
+ compile
org.springframework.boot
diff --git a/src/main/java/com/dota/nexus/config/CorsConfig.java b/src/main/java/com/dota/nexus/config/CorsConfig.java
new file mode 100644
index 0000000..e9b7fc5
--- /dev/null
+++ b/src/main/java/com/dota/nexus/config/CorsConfig.java
@@ -0,0 +1,19 @@
+package com.dota.nexus.config;
+
+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 CorsConfig implements WebMvcConfigurer {
+
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping("/**")
+ .allowedOriginPatterns("*")
+ .allowedHeaders("*")
+ .allowCredentials(true)
+ .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
+ .maxAge(3600);
+ }
+}