update ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java.

和文件下载那边一样,存在跨域问题
This commit is contained in:
younger007 2022-03-14 02:52:29 +00:00 committed by Gitee
parent 62fc38078c
commit 420a43cdd5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 0 additions and 1 deletions

View File

@ -204,7 +204,6 @@ public class GenController extends BaseController
private void genCode(HttpServletResponse response, byte[] data) throws IOException private void genCode(HttpServletResponse response, byte[] data) throws IOException
{ {
response.reset(); response.reset();
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\""); response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\"");
response.addHeader("Content-Length", "" + data.length); response.addHeader("Content-Length", "" + data.length);