feat(web-ui): improve navigation and session UX
This commit is contained in:
@@ -99,6 +99,15 @@ func main() {
|
||||
staticFS, _ := fs.Sub(staticFiles, "static")
|
||||
fileServer := http.FileServer(http.FS(staticFS))
|
||||
|
||||
mux.HandleFunc("/favicon.svg", func(w http.ResponseWriter, r *http.Request) {
|
||||
r.URL.Path = "/favicon.svg"
|
||||
fileServer.ServeHTTP(w, r)
|
||||
})
|
||||
|
||||
mux.HandleFunc("/favicon.ico", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.Redirect(w, r, "/favicon.svg", http.StatusMovedPermanently)
|
||||
})
|
||||
|
||||
mux.HandleFunc("/static/", func(w http.ResponseWriter, r *http.Request) {
|
||||
r.URL.Path = strings.TrimPrefix(r.URL.Path, "/static")
|
||||
fileServer.ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user