fix: `content-type` conflicts with #5420

pull/6028/head v3.29.0
Andy Hsu 2023-11-24 19:22:19 +08:00
parent 3f405de6a9
commit d26887d211
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
attachFileName(w, file)
contentType := link.Header.Get("Content-Type")
if contentType != "" {
w.Header().Add("Content-Type", contentType)
w.Header().Set("Content-Type", contentType)
}
http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile)
return nil