mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-16 18:54:43 +08:00
fix: 解决发布后网站图标丢失的问题
This commit is contained in:
parent
4e5aeb9d54
commit
eb2bfb80cf
@ -17,8 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func setWebStatic(rootRouter *gin.Engine) {
|
func setWebStatic(rootRouter *gin.Engine) {
|
||||||
rootRouter.StaticFS("/kubepi/login/onepanel", http.FS(web.IndexHtml))
|
rootRouter.StaticFS("/fav", http.FS(web.Favicon))
|
||||||
rootRouter.StaticFS("/favicon.ico", http.FS(web.Favicon))
|
|
||||||
rootRouter.GET("/assets/*filepath", func(c *gin.Context) {
|
rootRouter.GET("/assets/*filepath", func(c *gin.Context) {
|
||||||
staticServer := http.FileServer(http.FS(web.Assets))
|
staticServer := http.FileServer(http.FS(web.Assets))
|
||||||
staticServer.ServeHTTP(c.Writer, c.Request)
|
staticServer.ServeHTTP(c.Writer, c.Request)
|
||||||
|
@ -11,5 +11,5 @@ var Assets embed.FS
|
|||||||
//go:embed index.html
|
//go:embed index.html
|
||||||
var IndexByte []byte
|
var IndexByte []byte
|
||||||
|
|
||||||
//go:embed favicon.ico
|
//go:embed favicon.png
|
||||||
var Favicon embed.FS
|
var Favicon embed.FS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<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" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>loading...</title>
|
<title>loading...</title>
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user