Browse Source

Proxy the master UI to the leader as well

pull/1862/head
Patrick Schmidt 5 years ago
parent
commit
4075e9bfc1
  1. 2
      weed/server/master_server.go

2
weed/server/master_server.go

@ -110,7 +110,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers []string) *Maste
handleStaticResources2(r) handleStaticResources2(r)
r.HandleFunc("/", ms.proxyToLeader(ms.uiStatusHandler)) r.HandleFunc("/", ms.proxyToLeader(ms.uiStatusHandler))
r.HandleFunc("/ui/index.html", ms.uiStatusHandler)
r.HandleFunc("/ui/index.html", ms.proxyToLeader(ms.uiStatusHandler))
if !ms.option.DisableHttp { if !ms.option.DisableHttp {
r.HandleFunc("/dir/assign", ms.proxyToLeader(ms.guard.WhiteList(ms.dirAssignHandler))) r.HandleFunc("/dir/assign", ms.proxyToLeader(ms.guard.WhiteList(ms.dirAssignHandler)))
r.HandleFunc("/dir/lookup", ms.guard.WhiteList(ms.dirLookupHandler)) r.HandleFunc("/dir/lookup", ms.guard.WhiteList(ms.dirLookupHandler))

Loading…
Cancel
Save