mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: minor performance improvements
This commit is contained in:
14
main.go
14
main.go
@@ -247,14 +247,12 @@ func main() {
|
||||
// https://github.com/golang/go/issues/43431
|
||||
embeddedStatic, _ := fs.Sub(staticFiles, "static")
|
||||
static := conf.ChooseFS("static", embeddedStatic)
|
||||
|
||||
fileServer := gzipped.FileServer(fsutils.NewExistsHttpFs(
|
||||
fsutils.ExistsFS{
|
||||
Fs: fsutils.NeuteredFileSystem{
|
||||
Fs: static,
|
||||
},
|
||||
}),
|
||||
)
|
||||
fileServer := gzipped.FileServer(fsutils.NewExistsHttpFS(
|
||||
fsutils.NewExistsFS(
|
||||
fsutils.NeuteredFileSystem{
|
||||
FS: static,
|
||||
}).WithCache(!config.IsDev()),
|
||||
))
|
||||
|
||||
router.PathPrefix("/contribute.json").Handler(fileServer)
|
||||
router.PathPrefix("/assets").Handler(fileServer)
|
||||
|
||||
Reference in New Issue
Block a user