diff --git a/pkg/app/app.go b/pkg/app/app.go index 4b7ba6f..d5bb66e 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -52,7 +52,7 @@ func Start() { g.StaticFile("/", "./web/static/index.html") g.Static("/_app", "./web/static/_app") g.Static("/data", config.CurrentConfig.DataDirectory) - + g.Use(cors.Default()) InitializeRoutes(g) diff --git a/pkg/app/frontend_routes.go b/pkg/app/frontend_routes.go index ab40a42..4672f9b 100644 --- a/pkg/app/frontend_routes.go +++ b/pkg/app/frontend_routes.go @@ -1,8 +1,6 @@ package app import ( - "net/http" - "github.com/gin-gonic/gin" ) @@ -11,5 +9,5 @@ func InitializeFrontendRoutes(g *gin.Engine) { } func frontendHome(c *gin.Context) { - c.Redirect(http.StatusFound, "/") + c.File("./web/static/index.html") }