This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-01
Channels
- # announcements (10)
- # aws (1)
- # babashka (19)
- # beginners (104)
- # calva (50)
- # cider (17)
- # cljs-dev (135)
- # cljsrn (56)
- # clojure (240)
- # clojure-dev (4)
- # clojure-europe (19)
- # clojure-nl (2)
- # clojure-uk (7)
- # clojurescript (22)
- # conjure (2)
- # css (1)
- # cursive (10)
- # data-science (1)
- # datomic (60)
- # emacs (2)
- # events (2)
- # exercism (1)
- # figwheel-main (3)
- # fulcro (13)
- # graalvm (5)
- # gratitude (1)
- # inf-clojure (4)
- # introduce-yourself (5)
- # jobs-discuss (21)
- # lsp (36)
- # malli (6)
- # meander (8)
- # missionary (12)
- # off-topic (14)
- # pathom (13)
- # pedestal (10)
- # polylith (42)
- # re-frame (5)
- # reagent (12)
- # reitit (3)
- # releases (8)
- # sci (10)
- # shadow-cljs (37)
- # sql (5)
- # tools-deps (6)
Hi everyone. Hope you are having a good morning. I write you about https://github.com/metosin/reitit/issues/494. Are there any known workarounds? I've checked the commits linked by the issue submitter, and they seem to involve skipping validation. I am afraid that is an unacceptable solution for my use case. This issue is causing me a considerable roadblock. I would appreciate any update on the situation. Also I could volunteer some time to help with the resolution of this issue. Please let me know if/how I can be of any help.
Hello guys, I am having an issue serving static resources with a pedestal-reitit setup.
this is my project.clj resource-paths :resource-paths ["config", "resources", "target/cljsbuild"]
and I have added to my routes definition as following
(pedestal/routing-interceptor
(rhttp/router
;;; routes-definition-here in place of []
[]
{:exception pretty/exception
:data {:coercion reitit.coercion.spec/coercion
:muuntaja m/instance
:interceptors [;; swagger feature
swagger/swagger-feature
;; query-params & form-params
(parameters/parameters-interceptor)
;; content-negotiation
(muuntaja/format-negotiate-interceptor)
;; encoding response body
(muuntaja/format-response-interceptor)
;; exception handling
(exception/exception-interceptor)
;; decoding request body
(muuntaja/format-request-interceptor)
;; coercing response bodys
(coercion/coerce-response-interceptor)
;; coercing request parameters
(coercion/coerce-request-interceptor)
;;
coerce-form-params
;; multipart
(multipart/multipart-interceptor)]}})
(ring/routes
(ring/create-resource-handler)
(ring/create-default-handler))
)
the (ring/create-resource-handler) which by defaults look at public folder as per the documentation. And I have even added to pedestal settings the following
::http/resource-path "public"
Am i missing something here ? I can't figure out a way to read my app.js located under resources/public/js/app.js by pointing the js script src to js/app.js
I tracked down the issue in the reitit-ring code base https://github.com/metosin/reitit/blob/8694d312f86d14ac7df3fa431af7cfba6873d8d8/modules/reitit-ring/src/reitit/ring.cljc#L217 by adding another condition to the or
which becomes (or (response path) (response uri)
seems to work for me but i don't know if that is a bug in the code base