diff options
| author | Chris Lu <chris.lu@uber.com> | 2019-03-21 16:00:46 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@uber.com> | 2019-03-21 16:00:46 -0700 |
| commit | a3490b600cad88ced4ea9bf3672b8566f207f57f (patch) | |
| tree | 158a0fa50350132687ae842e2ba10cd4e9b72397 /weed/server/filer_server.go | |
| parent | 531add52c27f2754c36626f1efeab15029a47e29 (diff) | |
| download | seaweedfs-a3490b600cad88ced4ea9bf3672b8566f207f57f.tar.xz seaweedfs-a3490b600cad88ced4ea9bf3672b8566f207f57f.zip | |
weed filer, weed master: add option to disable http
Diffstat (limited to 'weed/server/filer_server.go')
| -rw-r--r-- | weed/server/filer_server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go index 43d319398..39238cc1f 100644 --- a/weed/server/filer_server.go +++ b/weed/server/filer_server.go @@ -34,6 +34,7 @@ type FilerOption struct { DirListingLimit int DataCenter string DefaultLevelDbDir string + DisableHttp bool } type FilerServer struct { @@ -74,7 +75,9 @@ func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, option *FilerOption) notification.LoadConfiguration(v.Sub("notification")) handleStaticResources(defaultMux) - defaultMux.HandleFunc("/", fs.filerHandler) + if !option.DisableHttp { + defaultMux.HandleFunc("/", fs.filerHandler) + } if defaultMux != readonlyMux { readonlyMux.HandleFunc("/", fs.readonlyFilerHandler) } |
