mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
fix: 解决发布后网站图标丢失的问题
This commit is contained in:
parent
4e5aeb9d54
commit
eb2bfb80cf
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user