From a32797518bfadf0982c5519ab636943c90d51bec Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 25 Mar 2019 09:20:05 -0700 Subject: [PATCH] weed master: redirect to leader for default admin UI fix https://github.com/chrislusf/seaweedfs/issues/898 --- weed/server/master_server.go | 2 +- weed/server/master_ui/templates.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/server/master_server.go b/weed/server/master_server.go index a70de5e6e..ef32809b0 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -79,7 +79,7 @@ func NewMasterServer(r *mux.Router, port int, metaFolder string, if !disableHttp { handleStaticResources2(r) - r.HandleFunc("/", ms.uiStatusHandler) + r.HandleFunc("/", ms.proxyToLeader(ms.uiStatusHandler)) r.HandleFunc("/ui/index.html", ms.uiStatusHandler) r.HandleFunc("/dir/assign", ms.proxyToLeader(ms.guard.WhiteList(ms.dirAssignHandler))) r.HandleFunc("/dir/lookup", ms.proxyToLeader(ms.guard.WhiteList(ms.dirLookupHandler))) diff --git a/weed/server/master_ui/templates.go b/weed/server/master_ui/templates.go index ce632b099..ceb0528cf 100644 --- a/weed/server/master_ui/templates.go +++ b/weed/server/master_ui/templates.go @@ -41,7 +41,7 @@ var StatusTpl = template.Must(template.New("status").Parse(`