添加项目前缀,日志无法插入 #731

This commit is contained in:
YunaiV 2025-02-09 07:15:59 +08:00
parent 19b5582a78
commit 949fa22509
1 changed files with 2 additions and 2 deletions

View File

@ -20,8 +20,8 @@ public abstract class ApiRequestFilter extends OncePerRequestFilter {
@Override @Override
protected boolean shouldNotFilter(HttpServletRequest request) { protected boolean shouldNotFilter(HttpServletRequest request) {
// 只过滤 API 请求的地址 // 只过滤 API 请求的地址
return !StrUtil.startWithAny(request.getRequestURI(), webProperties.getAdminApi().getPrefix(), String apiUri = request.getRequestURI().substring(request.getContextPath().length());
webProperties.getAppApi().getPrefix()); return !StrUtil.startWithAny(apiUri, webProperties.getAdminApi().getPrefix(), webProperties.getAppApi().getPrefix());
} }
} }