diff --git a/server/handles/down.go b/server/handles/down.go index 2c5c2fafc51..75bb8e87853 100644 --- a/server/handles/down.go +++ b/server/handles/down.go @@ -130,8 +130,8 @@ func localProxy(c *gin.Context, link *model.Link, file model.Obj, proxyRange boo } Writer := &common.WrittenResponseWriter{ResponseWriter: c.Writer} - //优先处理md文件 - if utils.Ext(file.GetName()) == "md" && setting.GetBool(conf.FilterReadMeScripts) { + absPath := c.Request.URL.String() + if absPath[1] == 'p' && utils.Ext(file.GetName()) == "md" && setting.GetBool(conf.FilterReadMeScripts) { buf := bytes.NewBuffer(make([]byte, 0, file.GetSize())) w := &common.InterceptResponseWriter{ResponseWriter: Writer, Writer: buf} err = common.Proxy(w, c.Request, link, file)