fix(webui): serve embedded static from /static/* correctly (fs.Sub(staticFS, "static"))
This commit is contained in:
parent
ab11490807
commit
fb92930e7a
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ func (s *Server) Start(ctx context.Context) error {
|
||||||
mux.HandleFunc("/", s.handleUIDash)
|
mux.HandleFunc("/", s.handleUIDash)
|
||||||
mux.HandleFunc("/summarizer", s.handleUISummarizer)
|
mux.HandleFunc("/summarizer", s.handleUISummarizer)
|
||||||
// Serve embedded static files under /static/
|
// Serve embedded static files under /static/
|
||||||
if sub, err := fs.Sub(staticFS, "."); err == nil {
|
if sub, err := fs.Sub(staticFS, "static"); err == nil {
|
||||||
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(sub))))
|
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.FS(sub))))
|
||||||
}
|
}
|
||||||
mux.HandleFunc("/login", s.handleLogin)
|
mux.HandleFunc("/login", s.handleLogin)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue