Vite-based frontend builds (#1900)

* Remove image conversion, add gzip
* Add MacOS Environment options
This commit is contained in:
kermieisinthehouse
2021-11-17 17:32:04 -08:00
committed by GitHub
parent 23b7d63417
commit a4e52d3130
26 changed files with 2910 additions and 5432 deletions

View File

@@ -30,6 +30,7 @@ import (
"github.com/stashapp/stash/pkg/manager/config"
"github.com/stashapp/stash/pkg/models"
"github.com/stashapp/stash/pkg/utils"
"github.com/vearutop/statigz"
)
var version string
@@ -213,11 +214,8 @@ func Start(uiBox embed.FS, loginUIBox embed.FS) {
if isStatic {
w.Header().Add("Cache-Control", "max-age=604800000")
}
uiRoot, err := fs.Sub(uiBox, uiRootDir)
if err != nil {
panic(err)
}
http.FileServer(http.FS(uiRoot)).ServeHTTP(w, r)
r.URL.Path = uiRootDir + r.URL.Path
statigz.FileServer(uiBox).ServeHTTP(w, r)
}
})