parent
da90a08e46
commit
aeb3af81fa
|
@ -41,7 +41,7 @@ public class ShiroUtils {
|
||||||
|
|
||||||
//api-对外文档页面提供的查询接口
|
//api-对外文档页面提供的查询接口
|
||||||
filterChainDefinitionMap.put("/api/document/**", "anon");
|
filterChainDefinitionMap.put("/api/document/**", "anon");
|
||||||
filterChainDefinitionMap.put("/document/**", "anon");
|
// filterChainDefinitionMap.put("/document/**", "anon");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Cookie getSessionIdCookie(){
|
public static Cookie getSessionIdCookie(){
|
||||||
|
|
|
@ -16,14 +16,14 @@ public class ApiKeyFilter extends AnonymousFilter {
|
||||||
@Override
|
@Override
|
||||||
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) {
|
protected boolean onPreHandle(ServletRequest request, ServletResponse response, Object mappedValue) {
|
||||||
try {
|
try {
|
||||||
try{
|
// try{
|
||||||
//这部分代码是为了测试打包完成之后能否访问文档相关路径,封版之前要删除
|
// //这部分代码是为了测试打包完成之后能否访问文档相关路径,封版之前要删除
|
||||||
HttpServletRequest httpServlet = WebUtils.toHttp(request);
|
// HttpServletRequest httpServlet = WebUtils.toHttp(request);
|
||||||
String url = httpServlet.getRequestURL().toString();
|
// String url = httpServlet.getRequestURL().toString();
|
||||||
LogUtil.info("Url message : "+url);
|
// LogUtil.info("Url message : "+url);
|
||||||
}catch (Exception e){
|
// }catch (Exception e){
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (!SecurityUtils.getSubject().isAuthenticated()) {
|
if (!SecurityUtils.getSubject().isAuthenticated()) {
|
||||||
String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request));
|
String userId = ApiKeyHandler.getUser(WebUtils.toHttp(request));
|
||||||
|
|
Loading…
Reference in New Issue