Merge pull request !76 from 高雄/master
@ -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 {
@Override