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

1. 代理IP处理02

parent 356ff45a
......@@ -80,10 +80,7 @@ public class SictTokenEndpoint {
String tokenValue = authHeader.replaceAll("(?i)Bearer", "").trim();
OAuth2AccessToken accessToken = tokenStore.readAccessToken(tokenValue);
if (accessToken == null || StrUtil.isBlank(accessToken.getValue())) {
return R.builder()
.code(Constant.BYTE_NO)
.data(Boolean.FALSE)
.msg("退出失败,token 无效").build();
return new R();
}
OAuth2Authentication auth2Authentication = tokenStore.readAuthentication(accessToken);
......
......@@ -65,7 +65,7 @@ public class RequestGlobalFilter implements GlobalFilter, Ordered {
// IP白名单
String ip = WebUtils.getIP(request);
// log.error("RemoteAddress = {}, ip = {}", request.getRemoteAddress(), ip);
log.error("RemoteAddress = {}, ip = {}", request.getRemoteAddress(), ip);
try {
if (whitIPConfig.getLimitFlag() && !IPStrUtil.matches(ip, whitIPConfig.getWhites())) {
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