Change max age on cache-control in production
This commit is contained in:
parent
d490581c44
commit
877ee7faa9
2
main.go
2
main.go
|
@ -72,7 +72,6 @@ func main() {
|
|||
|
||||
if os.Getenv("ENV") == "dev" {
|
||||
app.Use("/static", filesystem.New(filesystem.Config{
|
||||
MaxAge: 2592000,
|
||||
Root: http.Dir("./static"),
|
||||
}))
|
||||
app.Get("/errors/429", func(c *fiber.Ctx) error {
|
||||
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue