Parcourir la source

修改获取文件

Yangzw il y a 1 mois
Parent
commit
e32696ccc4

+ 2 - 2
feifan-framework/feifan-common/src/main/java/cn/newfeifan/mall/framework/common/util/servlet/ServletUtils.java

@@ -48,8 +48,8 @@ public class ServletUtils {
             response.setHeader("Content-Disposition", "inline");
             response.setContentType("video/mp4");
             response.setHeader("Accept-Ranges","bytes");
-            response.setHeader("Cache-Control","no-store");
-            response.setHeader("Pragma","no-cache");
+            response.setHeader("Cache-Control","no-cache");
+            response.setHeader("Access-Control-Allow-Origin","*");
         } else {
             response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8"));
             response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);