fix: SPA 路由支持 logo.svg 等静态资源文件
This commit is contained in:
@@ -130,7 +130,7 @@ func main() {
|
|||||||
fileServer.ServeHTTP(c.Writer, c.Request)
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
return
|
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)
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ func main() {
|
|||||||
fileServer.ServeHTTP(c.Writer, c.Request)
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
return
|
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)
|
fileServer.ServeHTTP(c.Writer, c.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user