Feat: embed static files

This commit is contained in:
HFO4
2020-03-09 14:07:36 +08:00
parent 1d0d6e5f31
commit 30311d181d
9 changed files with 80 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ import (
"github.com/HFO4/cloudreve/pkg/util"
"github.com/HFO4/cloudreve/routers/controllers"
"github.com/gin-contrib/cors"
"github.com/gin-contrib/static"
"github.com/gin-gonic/gin"
)
@@ -78,6 +79,7 @@ func InitMasterRouter() *gin.Engine {
/*
静态资源
*/
r.Use(static.Serve("/", bootstrap.StaticFS))
r.GET("manifest.json", controllers.Manifest)
v3 := r.Group("/api/v3")