mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Vite-based frontend builds (#1900)
* Remove image conversion, add gzip * Add MacOS Environment options
This commit is contained in:
committed by
GitHub
parent
23b7d63417
commit
a4e52d3130
@@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user