Commit 850fee3d authored by guozhipeng's avatar guozhipeng

飞书接口优化

parent fc3e445b
......@@ -121,9 +121,7 @@ public class OperateAuthFilter implements Filter {
}
}
}
//处理ODATA接口 OData接口仅允许本机访问 只有odata接口需要从cookies中读取参数
if (Pattern.matches("(.*/odata/v4/.*)", uri) && !"127.0.0.1".equals(ip) && !"0:0:0:0:0:0:0:1".equals(ip)) {
//拦截openFeishuService开放接口做特殊处理
//拦截飞书使用的开放的odata接口做特殊处理
if (
Pattern.matches("(.*/odata/v4/openFeishuService/.*)", uri) &&
!StringUtils.isEmpty(appKey) &&
......@@ -157,7 +155,8 @@ public class OperateAuthFilter implements Filter {
return;//返回结果
}
}
//拦截非本机访问的odata接口从cookies中读取参数做特殊处理(报表)
if (Pattern.matches("(.*/odata/v4/.*)", uri) && !"127.0.0.1".equals(ip) && !"0:0:0:0:0:0:0:1".equals(ip)) {
if (cookies == null || cookies.length == 0) {
Result<Object> wrapResult = Result.error("requestIP=" + ip + " requestURI=" + uri + " odata请求 cookies 不能为空!");
writeResult(response, wrapResult);
......@@ -256,6 +255,7 @@ public class OperateAuthFilter implements Filter {
writeResult(response, wrapResult);
return;
}
//首页重定向
if (request.getMethod().equals("GET") && ("/index.html".equals(uri))) {// "/index.html"跳转到"/"
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
response.setHeader("Pragma", "no-cache");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment