mirror of
https://github.com/SinTan1729/privtracker.git
synced 2024-12-27 15:58:35 -06:00
compress and cache static files
This commit is contained in:
parent
e7a7db57a5
commit
2e11bd96b5
1 changed files with 5 additions and 1 deletions
6
main.go
6
main.go
|
@ -34,7 +34,11 @@ func main() {
|
||||||
app.Use(myLogger())
|
app.Use(myLogger())
|
||||||
app.Use(hsts)
|
app.Use(hsts)
|
||||||
app.Get("/", docs)
|
app.Get("/", docs)
|
||||||
app.Static("/", "docs", fiber.Static{MaxAge: 3600 * 24 * 7})
|
app.Static("/", "docs", fiber.Static{
|
||||||
|
MaxAge: 3600 * 24 * 7,
|
||||||
|
Compress: true,
|
||||||
|
CacheDuration: time.Hour,
|
||||||
|
})
|
||||||
app.Get("/dashboard", monitor.New())
|
app.Get("/dashboard", monitor.New())
|
||||||
app.Get("/:room/announce", announce)
|
app.Get("/:room/announce", announce)
|
||||||
app.Get("/:room/scrape", scrape)
|
app.Get("/:room/scrape", scrape)
|
||||||
|
|
Loading…
Reference in a new issue