mirror of
https://github.com/suyiiyii/SIMS.git
synced 2025-06-02 00:16:11 +08:00
feat(cors): 暴力允许option请求通过
This commit is contained in:
parent
f867d7b7bc
commit
0fea9664f9
@ -28,7 +28,8 @@ public class RbacInterceptor implements HandlerInterceptor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if ("OPTIONS".equals(request.getMethod())) {
|
if ("OPTIONS".equals(request.getMethod())) {
|
||||||
return true;
|
response.setStatus(HttpServletResponse.SC_OK);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
// 获取用户角色
|
// 获取用户角色
|
||||||
List<String> roles = getUserRole(request).stream().map(Role::getRoleName).toList();
|
List<String> roles = getUserRole(request).stream().map(Role::getRoleName).toList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user