Fix internal admin styles

This commit is contained in:
Martin Boehm 2023-12-08 18:30:21 +01:00
parent f28a747baa
commit 61bdb8a346

View File

@ -65,6 +65,7 @@ func NewInternalServer(binding, certFiles string, db *db.RocksDB, chain bchain.B
s.templates = s.parseTemplates() s.templates = s.parseTemplates()
serveMux.Handle(path+"favicon.ico", http.FileServer(http.Dir("./static/"))) serveMux.Handle(path+"favicon.ico", http.FileServer(http.Dir("./static/")))
serveMux.Handle(path+"static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static/"))))
serveMux.HandleFunc(path+"metrics", promhttp.Handler().ServeHTTP) serveMux.HandleFunc(path+"metrics", promhttp.Handler().ServeHTTP)
serveMux.HandleFunc(path, s.index) serveMux.HandleFunc(path, s.index)
serveMux.HandleFunc(path+"admin", s.htmlTemplateHandler(s.adminIndex)) serveMux.HandleFunc(path+"admin", s.htmlTemplateHandler(s.adminIndex))