From eb2bfb80cf80b4b71bad6b295d8bd4862636bc92 Mon Sep 17 00:00:00 2001 From: ssongliu Date: Tue, 14 Feb 2023 17:58:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=90=8E=E7=BD=91=E7=AB=99=E5=9B=BE=E6=A0=87=E4=B8=A2=E5=A4=B1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/init/router/router.go | 3 +-- cmd/server/web/web.go | 2 +- frontend/index.html | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/init/router/router.go b/backend/init/router/router.go index 01f6c1310..689a0992a 100644 --- a/backend/init/router/router.go +++ b/backend/init/router/router.go @@ -17,8 +17,7 @@ import ( ) func setWebStatic(rootRouter *gin.Engine) { - rootRouter.StaticFS("/kubepi/login/onepanel", http.FS(web.IndexHtml)) - rootRouter.StaticFS("/favicon.ico", http.FS(web.Favicon)) + rootRouter.StaticFS("/fav", http.FS(web.Favicon)) rootRouter.GET("/assets/*filepath", func(c *gin.Context) { staticServer := http.FileServer(http.FS(web.Assets)) staticServer.ServeHTTP(c.Writer, c.Request) diff --git a/cmd/server/web/web.go b/cmd/server/web/web.go index f7ccfdfbd..dc7a3d3b0 100644 --- a/cmd/server/web/web.go +++ b/cmd/server/web/web.go @@ -11,5 +11,5 @@ var Assets embed.FS //go:embed index.html var IndexByte []byte -//go:embed favicon.ico +//go:embed favicon.png var Favicon embed.FS diff --git a/frontend/index.html b/frontend/index.html index 0e04fb870..2539871e2 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,7 +2,7 @@ - + loading...