feat: 文件加解密放开onlyOffice相关一切接口
This commit is contained in:
+10
@@ -47,6 +47,9 @@ public class DownloadDecryptFileServiceImpl implements DownloadDecryptFileServic
|
||||
@Value("#{'${download.enable}'}")
|
||||
private boolean enable;
|
||||
|
||||
@Value("#{'${download.white_url}'.split(',')}")
|
||||
private List<String> whiteUrls;
|
||||
|
||||
/**
|
||||
* 管理员角色
|
||||
*/
|
||||
@@ -90,6 +93,13 @@ public class DownloadDecryptFileServiceImpl implements DownloadDecryptFileServic
|
||||
if(!enable){
|
||||
return;
|
||||
}
|
||||
// 白名单不执行
|
||||
String requestUrl = request.getRequestURI();
|
||||
for (String whiteUrl : whiteUrls) {
|
||||
if (requestUrl.contains(whiteUrl)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 判断返回值是否为文件流,否则其他接口返回值会变更成字符串,导致前端无法解析
|
||||
HandlerMethod handlerMethod = (HandlerMethod) handler;
|
||||
InputStream responseBody = null;
|
||||
|
||||
Reference in New Issue
Block a user