pull/8540/merge
0x535a 2025-09-20 00:39:50 +05:30 committed by GitHub
commit 5d2332a508
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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)