mirror of https://github.com/stashapp/stash.git
Reuse static server for multiple requests (#2258)
This commit is contained in:
parent
0388aec942
commit
d9fb51f2f9
|
@ -184,6 +184,7 @@ func Start(uiBox embed.FS, loginUIBox embed.FS) {
|
|||
}
|
||||
|
||||
customUILocation := c.GetCustomUILocation()
|
||||
static := statigz.FileServer(uiBox)
|
||||
|
||||
// Serve the web app
|
||||
r.HandleFunc("/*", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -222,7 +223,7 @@ func Start(uiBox embed.FS, loginUIBox embed.FS) {
|
|||
}
|
||||
r.URL.Path = uiRootDir + r.URL.Path
|
||||
|
||||
statigz.FileServer(uiBox).ServeHTTP(w, r)
|
||||
static.ServeHTTP(w, r)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue