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:
jerebear12
2024-02-27 10:38:55 -06:00
committed by GitHub
parent e88467bb36
commit 85d6d5371b
6 changed files with 23 additions and 2 deletions

View File

@@ -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)
}
}