diff --git a/http/http.go b/http/http.go index 6765a0bb..0ec1b228 100644 --- a/http/http.go +++ b/http/http.go @@ -59,5 +59,9 @@ 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 + if server.BaseURL == "" { + return r, nil + } + + return http.StripPrefix(server.BaseURL, r), nil }