|
@@ -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(),
|
|
|
|
- webProperties.getAppApi().getPrefix());
|
|
|
|
|
|
+ String apiUri = request.getRequestURI().substring(request.getContextPath().length());
|
|
|
|
+ return !StrUtil.startWithAny(apiUri, webProperties.getAdminApi().getPrefix(), webProperties.getAppApi().getPrefix());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|