1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 08:19:15 +08:00

fix: 解决发布后网站图标丢失的问题

This commit is contained in:
ssongliu 2023-02-14 17:58:32 +08:00 committed by ssongliu
parent 4e5aeb9d54
commit eb2bfb80cf
3 changed files with 3 additions and 4 deletions

View File

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

View File

@ -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

View File

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.png" />
<link rel="icon" href="/fav/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>loading...</title>
</head>