Fork me on GitHub
#pedestal
<
2018-12-05
>
devurandom01:12:24

@mv: Possible. I have a /staticpart/*file route and I mount a (ring-middlewares/file document-root) interceptor there. From experience it appears that this interceptor will use the full path, including the /staticpart to locate files on the filesystem. I mitigate that using string/replace on the :path-info.

martinklepsch22:12:35

is anyone using io.pedestal.http.ring-middlewares/not-modified? I'm noticing that it doesn't return 304 responses when the following interceptor does:

(def test-interceptor
  {:name ::test
   :leave (ring-middlewares/response-fn-adapter
           (fn [response request]
             (not-modified/not-modified-response response request)))})

ddeaguiar23:12:09

@U050TNB9F weird. I’m not using it anywhere but it’s based on the ring not-modified middleware. There’s also a test for it here: https://github.com/pedestal/pedestal/blob/09dd88c4ce7f89c7fbb7a398077eb970b3785d2d/service/test/io/pedestal/http/ring_middlewares_test.clj#L140-L150

martinklepsch23:12:10

Thanks, I guess I’ll keep digging then :)