fix: SPA 路由支持 logo.svg 等静态资源文件
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user