@@ -47,7 +47,9 @@ public class WebMvcConfig extends WebMvcConfigurationSupport { | |||
@Override | |||
protected void addCorsMappings(CorsRegistry registry) { | |||
registry.addMapping("/**") | |||
.allowedOrigins("*") | |||
//SpringBoot升级2.4.0之后,跨域配置中的.allowedOrigins不再可用 | |||
// .allowedOrigins("*") | |||
.allowedOriginPatterns("*") | |||
.allowCredentials(true) | |||
.allowedMethods(ORIGINS) | |||
.maxAge(3600); |
@@ -92,6 +92,7 @@ public class ShiroConfig { | |||
filterChainDefinitionMap.put("/dronecode/generate", "anon"); | |||
//文件上传 | |||
filterChainDefinitionMap.put("/oss/uploadFile", "anon"); | |||
filterChainDefinitionMap.put("/health/**", "anon"); | |||
// 所有url都必须认证通过才可以访问 | |||
filterChainDefinitionMap.put("/**", "authc"); | |||