mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-11-29 01:00:05 +08:00
update 优化 satoken 鉴权拦截器 优化多次校验
This commit is contained in:
@@ -25,12 +25,12 @@ public class AuthFilter {
|
||||
return new SaReactorFilter()
|
||||
// 拦截地址
|
||||
.addInclude("/**")
|
||||
.setExcludeList(ignoreWhite.getWhites())
|
||||
.addExclude("/favicon.ico", "/actuator/**")
|
||||
// 鉴权方法:每次访问进入
|
||||
.setAuth(obj -> {
|
||||
// 登录校验 -- 拦截所有路由
|
||||
SaRouter.match("/**")
|
||||
.notMatch(ignoreWhite.getWhites())
|
||||
.check(r -> {
|
||||
// 检查是否登录 是否有token
|
||||
StpUtil.checkLogin();
|
||||
|
||||
Reference in New Issue
Block a user