diff --git a/api/conf/conf.go b/api/conf/conf.go index 6ea9af02de..2b26e5c821 100644 --- a/api/conf/conf.go +++ b/api/conf/conf.go @@ -36,7 +36,7 @@ const ( EnvDEV = "dev" EnvLOCAL = "local" - WebDir = "./html" + WebDir = "/html" ) var ( diff --git a/api/internal/route.go b/api/internal/route.go index a57e5c0e0a..dd0e54cd6d 100644 --- a/api/internal/route.go +++ b/api/internal/route.go @@ -49,9 +49,9 @@ func SetUpRouter() *gin.Engine { store := cookie.NewStore([]byte("secret")) r.Use(sessions.Sessions("session", store)) r.Use(filter.CORS(), filter.RequestId(), filter.RequestLogHandler(logger), filter.SchemaCheck(), filter.Authentication(), filter.RecoverHandler()) - r.Use(static.Serve("/", static.LocalFile(conf.WebDir, false))) + r.Use(static.Serve("/", static.LocalFile(conf.WorkDir + conf.WebDir, false))) r.NoRoute(func(c *gin.Context) { - c.File(fmt.Sprintf("%s/index.html", conf.WebDir)) + c.File(fmt.Sprintf("%s/index.html", conf.WorkDir + conf.WebDir)) }) factories := []handler.RegisterFactory{