diff --git a/http/data.go b/http/data.go index 48cf0a4b..2287afec 100644 --- a/http/data.go +++ b/http/data.go @@ -64,9 +64,5 @@ func handle(fn handleFunc, prefix string, storage *storage.Storage, server *sett } }) - if prefix == "" { - return handler - } - return http.StripPrefix(prefix, handler) } diff --git a/http/http.go b/http/http.go index 2190ac44..7557d479 100644 --- a/http/http.go +++ b/http/http.go @@ -60,5 +60,5 @@ func NewHandler(storage *storage.Storage, server *settings.Server) (http.Handler public.PathPrefix("/dl").Handler(monkey(publicDlHandler, "/api/public/dl/")).Methods("GET") public.PathPrefix("/share").Handler(monkey(publicShareHandler, "/api/public/share/")).Methods("GET") - return r, nil + return http.StripPrefix(server.BaseURL, r), nil }