godash/internal/router/middleware.go

11 lines
259 B
Go
Raw Normal View History

2023-06-21 17:19:21 +02:00
package router
import "github.com/labstack/echo/v4"
func longCacheLifetime(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
c.Response().Header().Set(echo.HeaderCacheControl, "public, max-age=31536000")
return next(c)
}
}