mirror of
https://github.com/AlistGo/alist.git
synced 2025-05-29 03:25:51 +08:00
🚧 remove customize head and body for manage
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
"io/fs"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func InitIndex() {
|
||||
@ -41,7 +42,11 @@ func Static(r *gin.Engine) {
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
c.Status(200)
|
||||
c.Header("Content-Type", "text/html")
|
||||
_, _ = c.Writer.WriteString(conf.IndexHtml)
|
||||
if strings.HasPrefix(c.Request.URL.Path, "/@manage") {
|
||||
_, _ = c.Writer.WriteString(conf.ManageHtml)
|
||||
} else {
|
||||
_, _ = c.Writer.WriteString(conf.IndexHtml)
|
||||
}
|
||||
c.Writer.Flush()
|
||||
c.Writer.WriteHeaderNow()
|
||||
})
|
||||
|
Reference in New Issue
Block a user