mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-06-27 23:48:23 +00:00
Add Cache-Control to static files
This commit is contained in:
parent
72366d47bd
commit
da44d02601
4
main.go
4
main.go
@ -32,6 +32,10 @@ func main() {
|
|||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
app.Use("/static", filesystem.New(filesystem.Config{
|
app.Use("/static", filesystem.New(filesystem.Config{
|
||||||
|
Next: func(c *fiber.Ctx) bool {
|
||||||
|
c.Response().Header.Add("Cache-Control", "public,max-age=2592000")
|
||||||
|
return false
|
||||||
|
},
|
||||||
Root: http.FS(static.GetFiles()),
|
Root: http.FS(static.GetFiles()),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user