godash/internal/router/middleware.go

10 lines
259 B
Go

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)
}
}