Commit 767a02be authored by 向怀芳's avatar 向怀芳 🎱

1. 代理IP处理02

parent 356ff45a
...@@ -80,10 +80,7 @@ public class SictTokenEndpoint { ...@@ -80,10 +80,7 @@ public class SictTokenEndpoint {
String tokenValue = authHeader.replaceAll("(?i)Bearer", "").trim(); String tokenValue = authHeader.replaceAll("(?i)Bearer", "").trim();
OAuth2AccessToken accessToken = tokenStore.readAccessToken(tokenValue); OAuth2AccessToken accessToken = tokenStore.readAccessToken(tokenValue);
if (accessToken == null || StrUtil.isBlank(accessToken.getValue())) { if (accessToken == null || StrUtil.isBlank(accessToken.getValue())) {
return R.builder() return new R();
.code(Constant.BYTE_NO)
.data(Boolean.FALSE)
.msg("退出失败,token 无效").build();
} }
OAuth2Authentication auth2Authentication = tokenStore.readAuthentication(accessToken); OAuth2Authentication auth2Authentication = tokenStore.readAuthentication(accessToken);
......
...@@ -65,7 +65,7 @@ public class RequestGlobalFilter implements GlobalFilter, Ordered { ...@@ -65,7 +65,7 @@ public class RequestGlobalFilter implements GlobalFilter, Ordered {
// IP白名单 // IP白名单
String ip = WebUtils.getIP(request); String ip = WebUtils.getIP(request);
// log.error("RemoteAddress = {}, ip = {}", request.getRemoteAddress(), ip); log.error("RemoteAddress = {}, ip = {}", request.getRemoteAddress(), ip);
try { try {
if (whitIPConfig.getLimitFlag() && !IPStrUtil.matches(ip, whitIPConfig.getWhites())) { if (whitIPConfig.getLimitFlag() && !IPStrUtil.matches(ip, whitIPConfig.getWhites())) {
ServerHttpResponse response = exchange.getResponse(); ServerHttpResponse response = exchange.getResponse();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment