-
Notifications
You must be signed in to change notification settings - Fork 871
Closed
Description
运行环境
Docker: 28.1.1
nginx: 1.22.1
版本:lanol/filecodebox:beta (Jul 5, 2025 at 12:07 am)
问题描述
如图,下载接口/share/download
返回头中Content-Type
的内容为text/plain
,这会导致一些浏览器下载行为异常

例如:手机的Edge在下载这个文件的时候,会自动识别文件头,并为文件加上.zip
后缀

复现方法
- 上传一个apk文件
- 手机扫码下载
缓解方法
在 nginx 中加入配置
location = /share/download {
...
proxy_hide_header Content-Type;
add_header Content-Type application/octet-stream;
...
}
Metadata
Metadata
Assignees
Labels
No labels