feat: admin页面不使用自定义样式

This commit is contained in:
Akizon77
2025-07-12 18:39:04 +08:00
parent 6af72f41c0
commit a125466b75

View File

@@ -113,7 +113,12 @@ func Static(r *gin.RouterGroup, noRoute func(handlers ...gin.HandlerFunc)) {
c.Header("Content-Type", "text/html")
c.Status(200)
c.Writer.WriteString(IndexFile)
if strings.HasPrefix(c.Request.RequestURI, "/admin") {
c.Writer.WriteString(RawIndexFile)
} else {
c.Writer.WriteString(IndexFile)
}
c.Writer.Flush()
c.Writer.WriteHeaderNow()
})