mirror of
https://github.com/HChaZZY/alist.git
synced 2025-12-21 01:27:25 +08:00
fix: content-type conflicts with #5420
This commit is contained in:
@@ -19,7 +19,7 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
|
|||||||
attachFileName(w, file)
|
attachFileName(w, file)
|
||||||
contentType := link.Header.Get("Content-Type")
|
contentType := link.Header.Get("Content-Type")
|
||||||
if contentType != "" {
|
if contentType != "" {
|
||||||
w.Header().Add("Content-Type", contentType)
|
w.Header().Set("Content-Type", contentType)
|
||||||
}
|
}
|
||||||
http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile)
|
http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile)
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user