YunaiV 2023-09-03 17:58:25 +08:00
parent b72302e201
commit c4cbb1db42
1 changed files with 2 additions and 2 deletions

View File

@ -89,10 +89,10 @@ public class WebFrameworkUtils {
return userType;
}
// 2. 其次,基于 URL 前缀的约定
if (request.getRequestURI().startsWith(properties.getAdminApi().getPrefix())) {
if (request.getServletPath().startsWith(properties.getAdminApi().getPrefix())) {
return UserTypeEnum.ADMIN.getValue();
}
if (request.getRequestURI().startsWith(properties.getAppApi().getPrefix())) {
if (request.getServletPath().startsWith(properties.getAppApi().getPrefix())) {
return UserTypeEnum.MEMBER.getValue();
}
return null;