fix: 登陆验证失效,改过的代码暂时回退

登陆验证失效,改过的代码暂时回退
This commit is contained in:
song.tianyang 2021-03-05 18:58:26 +08:00
parent da90a08e46
commit aeb3af81fa
2 changed files with 9 additions and 9 deletions

View File

@ -41,7 +41,7 @@ public class ShiroUtils {
//api-对外文档页面提供的查询接口
filterChainDefinitionMap.put("/api/document/**", "anon");
filterChainDefinitionMap.put("/document/**", "anon");
// filterChainDefinitionMap.put("/document/**", "anon");
}
public static Cookie getSessionIdCookie(){

View File

@ -16,14 +16,14 @@ public class ApiKeyFilter extends AnonymousFilter {
@Override
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) {
try {
try{
//这部分代码是为了测试打包完成之后能否访问文档相关路径封版之前要删除
HttpServletRequest httpServlet = WebUtils.toHttp(request);
String url = httpServlet.getRequestURL().toString();
LogUtil.info("Url message : "+url);
}catch (Exception e){
}
// try{
// //这部分代码是为了测试打包完成之后能否访问文档相关路径封版之前要删除
// HttpServletRequest httpServlet = WebUtils.toHttp(request);
// String url = httpServlet.getRequestURL().toString();
// LogUtil.info("Url message : "+url);
// }catch (Exception e){
//
// }
if (!SecurityUtils.getSubject().isAuthenticated()) {
String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request));