Disable filer UI in configuration (#5297)
* Add filer.ui.enabled configuration property * Add filer.expose_directory_metadata to config * Ammend commit * Remove ShowUI reference * Update all routes that allow directory metadata * Add cmd flag to server.go
This commit is contained in:
@@ -18,6 +18,11 @@ import (
|
||||
// is empty.
|
||||
func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if fs.option.ExposeDirectoryData == false {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
|
||||
stats.FilerHandlerCounter.WithLabelValues(stats.DirList).Inc()
|
||||
|
||||
path := r.URL.Path
|
||||
@@ -95,4 +100,5 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
|
||||
if err != nil {
|
||||
glog.V(0).Infof("Template Execute Error: %v", err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user