mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 10:13:28 +08:00
fix 全局解决导出excel时或者下载exlce导入模板时的跨域问题
This commit is contained in:
parent
d51b77f42b
commit
d2b5aab58c
@ -196,6 +196,7 @@ public class ExcelUtil {
|
||||
String filename = encodingFilename(sheetName);
|
||||
response.reset();
|
||||
FileUtils.setAttachmentResponseHeader(response, filename);
|
||||
response.addHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user