Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
8f23ff72
"litemall-admin/src/vscode:/vscode.git/clone" did not exist on "7e217d8573c0b7c3b17b6a22abec104b46f46ff9"
Unverified
Commit
8f23ff72
authored
Feb 25, 2022
by
若依
Committed by
Gitee
Feb 25, 2022
Browse files
!437 解决通用下载接口跨域问题
Merge pull request !437 from 兮陌/master
parents
e62e8e37
158e883e
Changes
1
Show whitespace changes
Inline
Side-by-side
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
View file @
8f23ff72
...
...
@@ -196,7 +196,6 @@ public class FileUtils
*
* @param response 响应对象
* @param realFileName 真实文件名
* @return
*/
public
static
void
setAttachmentResponseHeader
(
HttpServletResponse
response
,
String
realFileName
)
throws
UnsupportedEncodingException
{
...
...
@@ -210,7 +209,6 @@ 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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment