NutzCN Logo
问答 shiro 如何过滤静态资源
发布于 2660天前 作者 yiziyu 3208 次浏览 复制 上一个帖子 下一个帖子
标签:

[urls]
/cas = casFilter
/logout = logout
/assets/** = anon

配置/assets/** 没有用

7 回复

你怎么知道没用?

浏览中直接访问资源,会跳转到登录界面

controller 中的服务就可以过滤,这是为什么呢

贴一下日志

[DEBUG] 2017-08-04 18:41:31,204 org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3877) - ClusterManager: Check-in complete.
[DEBUG] 2017-08-04 18:41:46,646 org.jasig.cas.client.util.CommonUtils.constructServiceUrl(CommonUtils.java:356) - serviceUrl generated: http://localhost:8080/archives/assets/use.js
[DEBUG] 2017-08-04 18:41:46,647 cn.wizzer.app.web.commons.filter.CASAuthenticationFilter.doFilter(CASAuthenticationFilter.java:141) - no ticket and no assertion found
[DEBUG] 2017-08-04 18:41:46,647 cn.wizzer.app.web.commons.filter.CASAuthenticationFilter.doFilter(CASAuthenticationFilter.java:149) - Constructed service url: http://localhost:8080/archives/assets/use.js
[DEBUG] 2017-08-04 18:41:46,647 cn.wizzer.app.web.commons.filter.CASAuthenticationFilter.doFilter(CASAuthenticationFilter.java:154) - redirecting to "http://localhost:8080/realestate-sso/login?service=http%3A%2F%2Flocalhost%3A8080%2Farchives%2Fassets%2Fuse.js"
[DEBUG] 2017-08-04 18:41:46,647 cn.wizzer.app.web.commons.filter.CASAuthenticationFilter.doFilter(CASAuthenticationFilter.java:156) - redirecting to "http://localhost:8080/realestate-sso/login?service=http%3A%2F%2Flocalhost%3A8080%2Farchives%2Fassets%2Fuse.js"
2017-08-04 18:41:47,583 INFO [org.jasig.cas.ticket.registry.support.DefaultTicketRegistryCleaner] - <Beginning ticket cleanup.>

把shiro.ini完整贴一下, 记得移除敏感信息

是sso 的拦截问题

添加回复
请先登陆
回到顶部