mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-22 16:43:35 +08:00
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:
@@ -72,6 +72,7 @@ type FilerOption struct {
|
||||
DownloadMaxBytesPs int64
|
||||
DiskType string
|
||||
AllowedOrigins []string
|
||||
ExposeDirectoryData bool
|
||||
}
|
||||
|
||||
type FilerServer struct {
|
||||
@@ -115,6 +116,10 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption)
|
||||
domains := strings.Split(allowedOrigins, ",")
|
||||
option.AllowedOrigins = domains
|
||||
|
||||
v.SetDefault("filer.expose_directory_metadata.enabled", true)
|
||||
returnDirMetadata := v.GetBool("filer.expose_directory_metadata.enabled")
|
||||
option.ExposeDirectoryData = returnDirMetadata
|
||||
|
||||
fs = &FilerServer{
|
||||
option: option,
|
||||
grpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.filer"),
|
||||
|
Reference in New Issue
Block a user