去掉 Root 配置项

pull/1/head
Doflatango 8 years ago committed by miraclesu
parent 4dd7604eec
commit 395b814e28

@ -60,7 +60,7 @@ func InitRouters() (s *http.Server, err error) {
uidir := conf.Config.Web.UIDir uidir := conf.Config.Web.UIDir
if len(uidir) == 0 { if len(uidir) == 0 {
uidir = path.Join(conf.Config.Root, "web", "ui", "dist") uidir = path.Join("..", "..", "web", "ui", "dist")
} }
r.PathPrefix("/ui/").Handler(http.StripPrefix("/ui/", http.FileServer(http.Dir(uidir)))) r.PathPrefix("/ui/").Handler(http.StripPrefix("/ui/", http.FileServer(http.Dir(uidir))))

Loading…
Cancel
Save