Browse Source

volume server: remove whitelist for status checking

Volume liveness/readiness not work if jwt enabled, I try use param
-whiteList
but jwt breaks
pull/1433/head
Chris Lu 4 years ago
parent
commit
1901f15cd2
  1. 2
      weed/server/volume_server.go

2
weed/server/volume_server.go

@ -72,10 +72,10 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec) vs.guard = security.NewGuard(whiteList, signingKey, expiresAfterSec, readSigningKey, readExpiresAfterSec)
handleStaticResources(adminMux) handleStaticResources(adminMux)
adminMux.HandleFunc("/status", vs.statusHandler)
if signingKey == "" || enableUiAccess { if signingKey == "" || enableUiAccess {
// only expose the volume server details for safe environments // only expose the volume server details for safe environments
adminMux.HandleFunc("/ui/index.html", vs.uiStatusHandler) adminMux.HandleFunc("/ui/index.html", vs.uiStatusHandler)
adminMux.HandleFunc("/status", vs.guard.WhiteList(vs.statusHandler))
/* /*
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))

Loading…
Cancel
Save