feat: add CORS middleware for API routes

This commit is contained in:
2026-05-19 02:46:44 +02:00
parent 3a4fa82f14
commit ccfb469299
2 changed files with 46 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ func ProvideRouter(htmlRender render.HTMLRender) *gin.Engine {
gin.SetMode(gin.ReleaseMode)
}
r := gin.New()
r.Use(gin.Logger(), gin.Recovery())
r.Use(CORSMiddleware(), gin.Logger(), gin.Recovery())
r.Static("/static", "./static")
r.Static("/dist", "./dist")
r.HTMLRender = htmlRender