diff --git a/pom.xml b/pom.xml
index 5d7240cb..90b2433e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
com.github.liaochong
myexcel
- 4.5.0
+ 4.5.1
jar
myexcel
diff --git a/src/main/java/com/github/liaochong/myexcel/utils/AttachmentExportUtil.java b/src/main/java/com/github/liaochong/myexcel/utils/AttachmentExportUtil.java
index f3887c11..72e0af39 100644
--- a/src/main/java/com/github/liaochong/myexcel/utils/AttachmentExportUtil.java
+++ b/src/main/java/com/github/liaochong/myexcel/utils/AttachmentExportUtil.java
@@ -150,5 +150,6 @@ public static void export(Path path, String fileName, HttpServletResponse respon
private static void setAttachmentConfig(String fileName, HttpServletResponse response) throws UnsupportedEncodingException {
response.setCharacterEncoding(CharEncoding.UTF_8);
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CharEncoding.UTF_8).replace("+", "%20"));
+ response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
}
}
diff --git a/src/main/java/com/github/liaochong/myexcel/utils/AttachmentV2ExportUtil.java b/src/main/java/com/github/liaochong/myexcel/utils/AttachmentV2ExportUtil.java
index bd9f80fb..0ca582f7 100644
--- a/src/main/java/com/github/liaochong/myexcel/utils/AttachmentV2ExportUtil.java
+++ b/src/main/java/com/github/liaochong/myexcel/utils/AttachmentV2ExportUtil.java
@@ -150,5 +150,6 @@ public static void export(Path path, String fileName, HttpServletResponse respon
private static void setAttachmentConfig(String fileName, HttpServletResponse response) throws UnsupportedEncodingException {
response.setCharacterEncoding(CharEncoding.UTF_8);
response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, CharEncoding.UTF_8).replace("+", "%20"));
+ response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
}
}