Site: add config UI (BC) (#9812)

This commit is contained in:
andig 2024-01-27 13:38:16 +01:00 • committed by GitHub
parent 09d7e76312
commit 186ba62db7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 3910 additions and 1653 deletions

View file

@ -35,7 +35,7 @@ func getPreferredLanguage(header string) string {
}
func indexHandler() http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html; charset=UTF-8")
indexTemplate, err := fs.ReadFile(assets.Web, "index.html")
@ -60,7 +60,7 @@ func indexHandler() http.HandlerFunc {
}); err != nil {
log.ERROR.Println("httpd: failed to render main page:", err.Error())
}
})
}
}
// jsonHandler is a middleware that decorates responses with JSON and CORS headers