Browse Source

fix public handler setup

pull/114/head
chrislusf 10 years ago
parent
commit
62f5e35cbe
  1. 6
      go/weed/weed_server/volume_server.go

6
go/weed/weed_server/volume_server.go

@ -51,12 +51,12 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
adminMux.HandleFunc("/stats/counter", vs.guard.WhiteList(statsCounterHandler)) adminMux.HandleFunc("/stats/counter", vs.guard.WhiteList(statsCounterHandler))
adminMux.HandleFunc("/stats/memory", vs.guard.WhiteList(statsMemoryHandler)) adminMux.HandleFunc("/stats/memory", vs.guard.WhiteList(statsMemoryHandler))
adminMux.HandleFunc("/stats/disk", vs.guard.WhiteList(vs.statsDiskHandler)) adminMux.HandleFunc("/stats/disk", vs.guard.WhiteList(vs.statsDiskHandler))
if publicMux != adminMux {
// separated admin and public port
adminMux.HandleFunc("/delete", vs.guard.WhiteList(vs.batchDeleteHandler)) adminMux.HandleFunc("/delete", vs.guard.WhiteList(vs.batchDeleteHandler))
adminMux.HandleFunc("/", vs.privateStoreHandler) adminMux.HandleFunc("/", vs.privateStoreHandler)
}
if publicMux != adminMux {
// separated admin and public port
publicMux.HandleFunc("/", vs.publicReadOnlyHandler) publicMux.HandleFunc("/", vs.publicReadOnlyHandler)
}
go func() { go func() {
connected := true connected := true

Loading…
Cancel
Save