|
@@ -37,18 +37,18 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
* 配置全局跨域
|
|
|
* 开发、测试环境开启跨域, 正式环境不开启
|
|
|
*/
|
|
|
- @Override
|
|
|
- public void addCorsMappings(CorsRegistry registry) {
|
|
|
- String active = configConstant.active;
|
|
|
- if ("dev".equals(active) || "sit".equals(active)|| "locSit".equals(active)){
|
|
|
- registry.addMapping("/**")
|
|
|
- .allowedOrigins("*")
|
|
|
- .allowCredentials(true)
|
|
|
- .allowedMethods("GET", "POST", "DELETE", "PUT", "OPTIONS")
|
|
|
- .maxAge(3600);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+// @Override
|
|
|
+// public void addCorsMappings(CorsRegistry registry) {
|
|
|
+// String active = configConstant.active;
|
|
|
+// if ("dev".equals(active) || "sit".equals(active)|| "locSit".equals(active)){
|
|
|
+// registry.addMapping("/**")
|
|
|
+// .allowedOrigins("*")
|
|
|
+// .allowCredentials(true)
|
|
|
+// .allowedMethods("GET", "POST", "DELETE", "PUT", "OPTIONS")
|
|
|
+// .maxAge(3600);
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
|
|
|
|
|
|
/**
|