mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Fix: failed tests while static files not loaded
This commit is contained in:
@@ -47,6 +47,10 @@ func InjectSiteInfo() gin.HandlerFunc {
|
||||
ignoreFunc := func(c *gin.Context) {
|
||||
c.Next()
|
||||
}
|
||||
if bootstrap.StaticFS == nil {
|
||||
return ignoreFunc
|
||||
}
|
||||
|
||||
// 读取index.html
|
||||
file, err := bootstrap.StaticFS.Open("/index.html")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user