提交修改

This commit is contained in:
quyixiao 2020-11-05 15:18:06 +08:00
parent 0178bcde83
commit ff9be7b0f7
2 changed files with 1 additions and 3 deletions

View File

@ -52,6 +52,7 @@ public class ShiroConfig {
Map<String, String> filterMap = new LinkedHashMap<>();
filterMap.put("/webjars/**", "anon");
filterMap.put("/file/**", "anon");
filterMap.put("/user/lzstaffrole/role/**", "anon");
filterMap.put("/test/**", "anon");
filterMap.put("/druid/**", "anon");
filterMap.put("/app/**", "anon");

View File

@ -58,9 +58,6 @@ public class OAuth2Filter extends AuthenticatingFilter {
//获取请求token如果token不存在直接返回401
String token = getRequestToken((HttpServletRequest) request);
String profile = SpringContextUtils.getActiveProfile();
if(!"prod".equals(profile) ){
return true;
}
if(StringUtils.isBlank(token)){
HttpServletResponse httpResponse = (HttpServletResponse) response;
httpResponse.setHeader("Access-Control-Allow-Credentials", "true");