!76 修复安全限制 代码继续执行的问题

Merge pull request !76 from 高雄/master
pull/77/MERGE
kailing 2 years ago committed by Gitee
commit b5e281a3b1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -43,6 +43,7 @@ public class WebConfig implements WebMvcConfigurer {
Set<String> filterUri = new HashSet<>();
filterUri.add("/onlinePreview");
filterUri.add("/picturesPreview");
filterUri.add("/getCorsFile");
TrustHostFilter filter = new TrustHostFilter();
FilterRegistrationBean<TrustHostFilter> registrationBean = new FilterRegistrationBean<>();
registrationBean.setFilter(filter);

@ -75,7 +75,7 @@ public class DownloadUtils {
response.setMsg(fileName);
return response;
} catch (IOException | GalimatiasParseException e) {
logger.error("文件下载失败url{}", urlStr, e);
logger.error("文件下载失败url{}", urlStr);
response.setCode(1);
response.setContent(null);
if (e instanceof FileNotFoundException) {

@ -42,7 +42,9 @@ public class TrustHostFilter implements Filter {
response.getWriter().write(html);
response.getWriter().close();
}
chain.doFilter(request, response);
else {
chain.doFilter(request, response);
}
}
@Override

Loading…
Cancel
Save