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 b7afe430d3
commit f867d7b7bc

View File

@ -27,6 +27,9 @@ public class RbacInterceptor implements HandlerInterceptor {
if ("/error".equals(request.getRequestURI())) {
return true;
}
if ("OPTIONS".equals(request.getMethod())) {
return true;
}
// 获取用户角色
List<String> roles = getUserRole(request).stream().map(Role::getRoleName).toList();