fix filter logic
This commit is contained in:
parent
b1459824a6
commit
97e28f289b
@ -20,7 +20,8 @@ public abstract class ApiRequestFilter extends OncePerRequestFilter {
|
||||
@Override
|
||||
protected boolean shouldNotFilter(HttpServletRequest request) {
|
||||
// 只过滤 API 请求的地址
|
||||
return !StrUtil.startWithAny(request.getRequestURI(), webProperties.getAdminApi().getPrefix(),
|
||||
String contextPath = request.getContextPath();
|
||||
return !StrUtil.startWithAny(request.getRequestURI().substring(contextPath.length()), webProperties.getAdminApi().getPrefix(),
|
||||
webProperties.getAppApi().getPrefix());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user