feat(cors): 暴力允许option请求通过
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
Gitea Sync / trigger-gitea-sync (push) Waiting to run
Java CI with Maven / build (push) Waiting to run

This commit is contained in:
suyiiyii 2024-08-29 16:51:55 +08:00
parent f867d7b7bc
commit 0fea9664f9

View File

@ -28,7 +28,8 @@ public class RbacInterceptor implements HandlerInterceptor {
return true;
}
if ("OPTIONS".equals(request.getMethod())) {
return true;
response.setStatus(HttpServletResponse.SC_OK);
return false;
}
// 获取用户角色
List<String> roles = getUserRole(request).stream().map(Role::getRoleName).toList();