Hi,
I'm new to Clojure, and even newer to Luminus, and my learning project is to slowly port a Python webapp I wrote.
Since I want to do this porting slowly, component by component, I need to run both the Python and Luminus servers side by side (each on a different port). I'm pretty sure this is doable with CORS, and so I assume ring-cors might help, but the problem is that I'm really not sure how to do this. I tried adding wrap-cors in the :middleware list of the app-handler:
(def app (middleware/app-handler
[home-routes app-routes]
:middleware [wrap-cors]
:access-rules []
:formats [:json-kw :edn]))
but it doesn't seem to be sufficient. I guess I need to add a :access-control-allow-origin param like the ring-cors doc mentions:
but I can't find any example close enough in the doc or source code to let me infer how to do this. So am I on the right track, is what I want to do doable, and if so, how do I do it?
Many thanks,
Christian