Skip to content

Commit d77cb9d

Browse files
YunaiVmapleafly
authored andcommitted
添加项目前缀,日志无法插入 YunaiV#731
1 parent b088bc5 commit d77cb9d

File tree

1 file changed

+2
-2
lines changed
  • yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter

1 file changed

+2
-2
lines changed

yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/ApiRequestFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public abstract class ApiRequestFilter extends OncePerRequestFilter {
2020
@Override
2121
protected boolean shouldNotFilter(HttpServletRequest request) {
2222
// 只过滤 API 请求的地址
23-
return !StrUtil.startWithAny(request.getRequestURI(), webProperties.getAdminApi().getPrefix(),
24-
webProperties.getAppApi().getPrefix());
23+
String apiUri = request.getRequestURI().substring(request.getContextPath().length());
24+
return !StrUtil.startWithAny(apiUri, webProperties.getAdminApi().getPrefix(), webProperties.getAppApi().getPrefix());
2525
}
2626

2727
}

0 commit comments

Comments
 (0)