fix 跨域访问之后 下载无法获取 download-filename

This commit is contained in:
疯狂的狮子Li 2021-10-24 17:13:04 +08:00
parent a4558c32b2
commit 4583787759
1 changed files with 2 additions and 0 deletions

View File

@ -210,6 +210,8 @@ public class FileUtils
.append("utf-8''")
.append(percentEncodedFileName);
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition,download-filename");
response.setHeader("Content-disposition", contentDispositionValue.toString());
response.setHeader("download-filename", percentEncodedFileName);
}