diff --git a/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java b/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java index 5a5e1f222b..e48a56c994 100644 --- a/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java +++ b/backend/src/main/java/io/metersphere/commons/utils/ShiroUtils.java @@ -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(){ diff --git a/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java b/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java index f6de8b3f27..6ac904e70b 100644 --- a/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java +++ b/backend/src/main/java/io/metersphere/security/ApiKeyFilter.java @@ -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));