aboutsummaryrefslogtreecommitdiff
path: root/weed/server/filer_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/filer_server.go')
-rw-r--r--weed/server/filer_server.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/weed/server/filer_server.go b/weed/server/filer_server.go
index 467545dfd..26b261087 100644
--- a/weed/server/filer_server.go
+++ b/weed/server/filer_server.go
@@ -57,7 +57,7 @@ type FilerServer struct {
masterNodes *storage.MasterNodes
}
-func NewFilerServer(defaultMux *http.ServeMux, ip string, port int, master string, dir string, collection string,
+func NewFilerServer(defaultMux, readonlyMux *http.ServeMux, ip string, port int, master string, dir string, collection string,
replication string, redirectOnRead bool, disableDirListing bool,
confFile string,
maxMB int,
@@ -111,6 +111,9 @@ func NewFilerServer(defaultMux *http.ServeMux, ip string, port int, master strin
}
defaultMux.HandleFunc("/", fs.filerHandler)
+ if defaultMux != readonlyMux {
+ readonlyMux.HandleFunc("/", fs.readonlyFilerHandler)
+ }
go func() {
connected := true