fix: fallback to index.html

This commit is contained in:
Paul Pan 2023-12-23 17:34:45 +08:00
parent e5a48f2627
commit 0fc977a5e0
Signed by: Paul
GPG Key ID: D639BDF5BA578AF4

View File

@ -120,6 +120,9 @@ func (s *service) initRouters(conf *model.Config, injector *do.Injector) *gin.En
// static files
r.Use(static.Serve("/", static.LocalFile("./resource/frontend", true)))
r.NoRoute(func(c *gin.Context) {
c.File("./resource/frontend/index.html")
})
return r
}