|
|
@@ -2,6 +2,7 @@ package com.seecoder.BlueWhale.Configure;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
@Configuration
|
|
|
@@ -17,4 +18,12 @@ public class MyWebMvcConfig implements WebMvcConfigurer {
|
|
|
.excludePathPatterns("/api/user/login")
|
|
|
.order(1);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void addCorsMappings(CorsRegistry registry) {
|
|
|
+ registry.addMapping("/**")
|
|
|
+ .allowedOrigins("*")
|
|
|
+ .allowedMethods("*")
|
|
|
+ .allowedHeaders("*");
|
|
|
+ }
|
|
|
}
|