mirror of https://github.com/Xhofe/alist
fix(handles): fix the README checking issue
parent
630cf30af5
commit
4b89b17bb5
|
@ -131,7 +131,7 @@ func localProxy(c *gin.Context, link *model.Link, file model.Obj, proxyRange boo
|
||||||
Writer := &common.WrittenResponseWriter{ResponseWriter: c.Writer}
|
Writer := &common.WrittenResponseWriter{ResponseWriter: c.Writer}
|
||||||
|
|
||||||
//优先处理md文件
|
//优先处理md文件
|
||||||
if utils.Ext(file.GetName()) == "md" && setting.GetBool(conf.FilterReadMeScripts) {
|
if file.GetName() == "README.md" && setting.GetBool(conf.FilterReadMeScripts) {
|
||||||
buf := bytes.NewBuffer(make([]byte, 0, file.GetSize()))
|
buf := bytes.NewBuffer(make([]byte, 0, file.GetSize()))
|
||||||
w := &common.InterceptResponseWriter{ResponseWriter: Writer, Writer: buf}
|
w := &common.InterceptResponseWriter{ResponseWriter: Writer, Writer: buf}
|
||||||
err = common.Proxy(w, c.Request, link, file)
|
err = common.Proxy(w, c.Request, link, file)
|
||||||
|
|
Loading…
Reference in New Issue