🚧 remove customize head and body for manage

This commit is contained in:
微凉
2022-01-08 21:10:34 +08:00
parent 0fbbd54b0c
commit 925f386bed
3 changed files with 10 additions and 4 deletions

View File

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