提交修改
This commit is contained in:
parent
65fb40f651
commit
0178bcde83
@ -58,7 +58,10 @@ public class OAuth2Filter extends AuthenticatingFilter {
|
||||
//获取请求token,如果token不存在,直接返回401
|
||||
String token = getRequestToken((HttpServletRequest) request);
|
||||
String profile = SpringContextUtils.getActiveProfile();
|
||||
if("prod".equals(profile) && StringUtils.isBlank(token)){
|
||||
if(!"prod".equals(profile) ){
|
||||
return true;
|
||||
}
|
||||
if(StringUtils.isBlank(token)){
|
||||
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||
httpResponse.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user