aboutsummaryrefslogtreecommitdiff
path: root/weed/server/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/common.go')
-rw-r--r--weed/server/common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/server/common.go b/weed/server/common.go
index 215ee1036..9b9ed7659 100644
--- a/weed/server/common.go
+++ b/weed/server/common.go
@@ -20,6 +20,7 @@ import (
_ "github.com/chrislusf/seaweedfs/weed/statik"
statik "github.com/rakyll/statik/fs"
+ "github.com/gorilla/mux"
)
var serverStats *stats.ServerStats
@@ -198,3 +199,8 @@ func handleStaticResources(defaultMux *http.ServeMux) {
defaultMux.Handle("/favicon.ico", http.FileServer(statikFS))
defaultMux.Handle("/seaweedfsstatic/", http.StripPrefix("/seaweedfsstatic", http.FileServer(statikFS)))
}
+
+func handleStaticResources2(r *mux.Router) {
+ r.Handle("/favicon.ico", http.FileServer(statikFS))
+ r.PathPrefix("/seaweedfsstatic/").Handler(http.StripPrefix("/seaweedfsstatic", http.FileServer(statikFS)))
+}