diff --git a/backend/src/uxbox/http.clj b/backend/src/uxbox/http.clj index 0f24dee2b3..959e0ca2fe 100644 --- a/backend/src/uxbox/http.clj +++ b/backend/src/uxbox/http.clj @@ -58,7 +58,7 @@ :method :get}]]]] handler (vw/handler ctx - (vw/assets "/media/*" {:root "resources/public/media/"}) + (vw/assets "/media/*" {:root "resources/public/media"}) (vw/assets "/static/*" {:root "resources/public/static"}) (vw/router routes))] diff --git a/backend/vendor/vertx/src/vertx/web.clj b/backend/vendor/vertx/src/vertx/web.clj index 5fa090cf07..36a212add7 100644 --- a/backend/vendor/vertx/src/vertx/web.clj +++ b/backend/vendor/vertx/src/vertx/web.clj @@ -69,9 +69,16 @@ (fn [^Router router] (let [^Route route (.route router path) ^Handler handler (doto (StaticHandler/create) + (.setCachingEnabled false) (.setWebRoot root) (.setDirectoryListing true))] (.handler route handler) + ;; A hack for lie to body handler that request is already handled. + (.handler route + (reify Handler + (handle [_ rc] + (.put ^RoutingContext rc "__body-handled" true) + (.next ^RoutingContext rc)))) router)))) (defn- default-handler