mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-05-03 04:13:46 +08:00
调整 sa-token-demo-solon,使用 SaTokenInterceptor 替代之前的 SaTokenPathInterceptor(旧的标为弃用)
This commit is contained in:
parent
1e87426481
commit
9b9de79245
@ -22,9 +22,9 @@ public class SaTokenConfigure {
|
|||||||
/**
|
/**
|
||||||
* 注册 [sa-token全局过滤器]
|
* 注册 [sa-token全局过滤器]
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean(index = -100)
|
||||||
public void tokenPathFilter() {
|
public SaTokenInterceptor tokenPathFilter() {
|
||||||
Solon.app().before(new SaTokenPathInterceptor()
|
return new SaTokenInterceptor()
|
||||||
|
|
||||||
// 指定 [拦截路由] 与 [放行路由]
|
// 指定 [拦截路由] 与 [放行路由]
|
||||||
.addInclude("/**").addExclude("/favicon.ico")
|
.addInclude("/**").addExclude("/favicon.ico")
|
||||||
@ -55,7 +55,6 @@ public class SaTokenConfigure {
|
|||||||
// 禁用浏览器内容嗅探
|
// 禁用浏览器内容嗅探
|
||||||
.setHeader("X-Content-Type-Options", "nosniff")
|
.setHeader("X-Content-Type-Options", "nosniff")
|
||||||
;
|
;
|
||||||
})
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user