mirror of
https://git.maid.zone/stuff/soundcloak.git
synced 2025-12-10 05:39:38 +05:00
allow instances to easily override assets (read readme)
This commit is contained in:
3
main.go
3
main.go
@@ -40,7 +40,8 @@ func main() {
|
||||
app.Use(recover.New())
|
||||
app.Use(compress.New(compress.Config{Level: compress.LevelBestSpeed}))
|
||||
|
||||
app.Static("/", "assets", fiber.Static{Compress: true, MaxAge: 7200}) // 2 hours
|
||||
app.Static("/", "instance", fiber.Static{Compress: true, MaxAge: 7200}) // 2 hours
|
||||
app.Static("/", "assets", fiber.Static{Compress: true, MaxAge: 14400}) // 4 hours
|
||||
app.Static("/js/hls.js/", "node_modules/hls.js/dist", fiber.Static{Compress: true, MaxAge: 28800}) // 8 hours
|
||||
|
||||
// Just for easy inspection of cache in development. Since debug is constant, the compiler will just remove the code below if it's set to false, so this has no runtime overhead.
|
||||
|
||||
Reference in New Issue
Block a user