package httpserver import ( "net/http" ) func RegisterWebui() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/" { http.Redirect(w, r, "/web/", http.StatusPermanentRedirect) return } http.NotFound(w, r) }) fs := http.FileServer(http.Dir("web")) http.Handle("/web/", http.StripPrefix("/web/", fs)) }