From 867accafd1dd6e30f7fc6339c3a47ba9f3821ec4 Mon Sep 17 00:00:00 2001 From: MuGu <94156510@qq.com> Date: Sat, 18 Nov 2023 22:36:41 +0800 Subject: [PATCH] fix(local): video file thumbnails not displaying on iOS Safari (#5420) * perf(webdav): support for cookies on webdav drive * fix(local): video file thumbnails not displaying on iOS Safari --- server/common/proxy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/common/proxy.go b/server/common/proxy.go index 8156dc885ef..a4f04abfe2c 100644 --- a/server/common/proxy.go +++ b/server/common/proxy.go @@ -17,6 +17,10 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model. if link.MFile != nil { defer link.MFile.Close() attachFileName(w, file) + contentType := link.Header.Get("Content-Type") + if contentType != "" { + w.Header().Add("Content-Type", contentType) + } http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile) return nil } else if link.RangeReadCloser != nil {