fix: SPA 路由支持 logo.svg 等静态资源文件

This commit is contained in:
shirainbown
2026-06-19 00:31:54 +08:00
parent 73ca3ee65a
commit e31b6b21f1

View File

@@ -130,7 +130,7 @@ func main() {
fileServer.ServeHTTP(c.Writer, c.Request)
return
}
if path == "/favicon.ico" {
if path == "/favicon.ico" || path == "/logo.svg" || path == "/favicon.png" || path == "/apple-touch-icon.png" {
fileServer.ServeHTTP(c.Writer, c.Request)
return
}
@@ -153,7 +153,7 @@ func main() {
fileServer.ServeHTTP(c.Writer, c.Request)
return
}
if path == "/favicon.ico" {
if path == "/favicon.ico" || path == "/logo.svg" || path == "/favicon.png" || path == "/apple-touch-icon.png" {
fileServer.ServeHTTP(c.Writer, c.Request)
return
}