feat: wire compression and cache middlewares into router

This commit is contained in:
2026-07-03 02:59:53 +02:00
parent 37717fec69
commit 22b26da0dc
2 changed files with 1 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ func ProvideRouter(cfg config.Config, htmlRender render.HTMLRender) *gin.Engine
gin.SetMode(cfg.GinMode)
}
r := gin.New()
r.Use(CORSMiddlewareWithConfig(cfg), RequestContextMiddleware(), audit.ContextMiddleware(), RequestLogger(), gin.Recovery())
r.Use(CORSMiddlewareWithConfig(cfg), RequestContextMiddleware(), audit.ContextMiddleware(), RequestLogger(), CompressionMiddleware(), StaticCacheMiddleware(), gin.Recovery())
r.NoRoute(func(c *gin.Context) {
if acceptsHTML(c) {
c.HTML(http.StatusNotFound, "not_found.gohtml", gin.H{