From d26887d211c87b68da00827096ba85944e998256 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Fri, 24 Nov 2023 19:22:19 +0800 Subject: [PATCH] fix: `content-type` conflicts with #5420 --- server/common/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/common/proxy.go b/server/common/proxy.go index a4f04abf..4ca4ba7f 100644 --- a/server/common/proxy.go +++ b/server/common/proxy.go @@ -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