From 877ee7faa935aa1073dd21260f19952e018df416 Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Wed, 16 Aug 2023 11:46:41 -0400 Subject: [PATCH] Change max age on cache-control in production --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 881c6dc..4360b09 100644 --- a/main.go +++ b/main.go @@ -72,8 +72,7 @@ func main() { if os.Getenv("ENV") == "dev" { app.Use("/static", filesystem.New(filesystem.Config{ - MaxAge: 2592000, - Root: http.Dir("./static"), + Root: http.Dir("./static"), })) app.Get("/errors/429", func(c *fiber.Ctx) error { return c.Render("errors/429", nil) @@ -88,6 +87,7 @@ func main() { }) } else { app.Use("/static", filesystem.New(filesystem.Config{ + MaxAge: 2592000, Root: http.FS(static.GetFiles()), })) app.Use(cache.New(cache.Config{